Lens functions and operators
Modules | Description |
Function or value | Description |
|
|
|
|
Full Usage:
x <&> f
Parameters:
^F<'t>
-
The functor.
f : 't -> 'u
-
The mapper function.
Returns: 'F<'u>
The mapped Functor.
Modifiers: inline Type parameters: ^F<'t>, 't, 'u, 'F<'u> |
|
|
|
|
|
Full Usage:
_1 f t
Parameters:
'a -> ^b
t : ^f
Returns: 'e
Modifiers: inline |
|
Full Usage:
_2 f t
Parameters:
'a -> ^b
t : ^f
Returns: 'e
Modifiers: inline |
|
Full Usage:
_3 f t
Parameters:
'a -> ^b
t : ^f
Returns: 'e
Modifiers: inline |
|
Full Usage:
_4 f t
Parameters:
'a -> ^b
t : ^f
Returns: 'e
Modifiers: inline |
|
Full Usage:
_5 f t
Parameters:
'a -> ^b
t : ^f
Returns: 'e
Modifiers: inline |
|
Full Usage:
_None x
Parameters:
unit -> ^a
Returns: 'c option -> ^d
Modifiers: inline |
|
Full Usage:
_Some x
Parameters:
'a -> ^b
Returns: 'a option -> ^d
Modifiers: inline |
|
Full Usage:
_all ref f s
Parameters:
'a
f : 'a -> ^b
s : ^c
Returns: ^d
Modifiers: inline |
|
|
|
|
|
Full Usage:
both f (a, b)
Parameters:
'a -> ^b
a : 'a
b : 'a
Returns: ^f
Modifiers: inline |
|
Full Usage:
choosed p f s
Parameters:
'a -> 'b option
f : 'b -> ^c
s : 'a
Returns: ^c
Modifiers: inline |
|
Full Usage:
choosing optic1 optic2 f _arg1
Parameters:
('a -> 'F<'b>) -> 's1 -> ^F<'t1>
optic2 : ('a -> 'F<'b>) -> 's2 -> ^F<'t2>
f : 'a -> 'F<'b>
_arg1 : Result<'s2, 's1>
Returns: 'F
Modifiers: inline Type parameters: 's1, 't1, 's2, 't2, 'a, 'b, ^F<'t1>, ^F<'t2>, 'F<'b>, 'F<Result<'t2,'t1>> |
|
|
|
Full Usage:
filtered p f s
Parameters:
'a -> bool
f : 'a -> ^b
s : 'a
Returns: ^b
Modifiers: inline |
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
iso func inv
Parameters:
's -> 'a
-
The transform function.
inv : 'b -> 't
-
The inverse of the transform function.
Returns: ^i -> ^j
The iso.
Modifiers: inline Type parameters: 's, 'a, 'b, 't, ^i, ^j, ^k, 'l |
|
Full Usage:
items x
Parameters:
'a -> 'b
Returns: ^c -> ^d
Modifiers: inline |
|
Full Usage:
lens getter setter f s
Parameters:
's -> 'a
-
The getter function.
setter : 's -> 'b -> 't
-
The setter function, having as first parameter the object and second the value to set.
f : 'a -> ^F<'b>
-
The free parameter.
s : 's
-
Returns: 'F<'t>
The lens.
Modifiers: inline Type parameters: 's, 'a, 'b, 't, ^F<'b>, 'F<'t> |
The lens should be assigned as an inline function of the free parameter, not a value, otherwise compiler will fail with a type constraint mismatch.
|
|
|
Full Usage:
non def f ma
Parameters:
'a
f : 'a -> ^b
ma : 'a option
Returns: 'c
Modifiers: inline |
|
|
|
|
|
Full Usage:
prism constructor getter f
Parameters:
'b -> 't
-
The constructor function.
getter : 's -> Result<'a, 't>
-
The getter function, having as first parameter the object and second the value to set.
f : 'a -> ^F<'b>
-
The free parameter.
Returns: 's -> ^F<'t>
The prism.
Modifiers: inline Type parameters: 'b, 't, 's, 'a, ^F<'b>, ^F<'t> |
The prism should be assigned as an inline function of the free parameter, not a value, otherwise compiler will fail with a type constraint mismatch.Using Result instead of Option to permit the types of 's and 't to differ.
|
Full Usage:
prism' constructor getter f
Parameters:
'b -> 's
-
The constructor function.
getter : 's -> Option<'a>
-
The getter function, having as first parameter the object and second the value to set.
f : 'a -> ^F<'b>
-
The free parameter.
Returns: 's -> ^F<'t>
The prism.
Modifiers: inline Type parameters: 'b, 's, 'a, ^F<'b>, ^F<'t> |
The prism should be assigned as an inline function of the free parameter, not a value, otherwise compiler will fail with a type constraint mismatch.Using Option which makes 's and 't the same type.
|
|
|
Full Usage:
to' k
Parameters:
'a -> 'b
Returns: ^c -> ^d
Modifiers: inline |
|
|
|
|
|