chrilves/elm-io/1.2.1

NOTE: this package is not compatible with Elm 0.19.1

Select

Selects are a lot like lenses but in a select from type a to b, the a part may not exist in b.

type alias Select a b =
b -> Maybe ( a, a -> b )

The type of a slects.

lift : Lens a b -> Select a b

Build a lens from an equivalence between types a and b.

nothing : Select a b

A select that always fails.

compose : Select a b -> Select b c -> Select a c

Compose two selects.

congruence : Select a b -> (a -> a) -> b -> b

If you have a lens from a to b and a function on a then you get a function on b.