TransAlt


Lens

Lens Related combinators

Nested types and modules

TypeDescription
Lens<'r, 'a>

Lenses are composable functional references. They allow you to access and modify data potentially very deep within a structure!

Functions and values

Function or valueDescription
id ()
Signature: unit -> Lens<'?7175,'?7175>
Type parameters: '?7175

id lens represens get set of object inself

idTyped ()
Signature: unit -> Lens<'s,'s>
Type parameters: 's

the same as id but with possibility to set a type

merge l1 l2
Signature: l1:Lens<'s,'r> -> l2:Lens<'r,'v> -> Lens<'s,'v>
Type parameters: 's, 'r, 'v

composes together two lenses like we usually do in oop obj.getter1.getter2

zip a b
Signature: a:Lens<'?7179,'?7180> -> b:Lens<'?7179,'?7181> -> Lens<'?7179,('?7180 * '?7181)>
Type parameters: '?7179, '?7180, '?7181

zip two lenses together get will return tuple of both gets and set will set both sets with values from a tuple

Fork me on GitHub