Functions for navigating deeply-hierarchical nested values with optional properties.
The A module is specialized to operating on values that are not a Maybe a, but contain accessors that are "and-then-able".
import A
import Q
type alias User =
{ profile : Maybe { name : Maybe String, id : Int }
toUserName : User -> Maybe String
toUserName =
A.qq .profile .name
toUserId : User -> Maybe Int
toUserId =
A.qq .profile (Q.j .id)Apply three "and-then-able" functions in order to a value.
Apply four "and-then-able" functions in order to a value.
Apply five "and-then-able" functions in order to a value.
Apply six "and-then-able" functions in order to a value.
Apply seven "and-then-able" functions in order to a value.
Apply eight "and-then-able" functions in order to a value.
Apply nine "and-then-able" functions in order to a value.
Apply ten "and-then-able" functions in order to a value.
Apply eleven "and-then-able" functions in order to a value.
Same as A.qqqq, just easier to read.
Same as A.qqqqq, just easier to read.
Same as A.qqqqqq, just easier to read.
Same as A.qqqqqqq, just easier to read.
Same as A.qqqqqqqq, just easier to read.
Same as A.qqqqqqqqq, just easier to read.
Same as A.qqqqqqqqqq, just easier to read.
Same as A.qqqqqqqqqqq, just easier to read.
Apply two "and-then-able" functions in order to a value.