Functions for navigating deeply-hierarchial 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 qqqqqq, just easier to read.
Same as qqqqqqq, just easier to read.
Same as qqqqqqqq, just easier to read.
Same as qqqqqqqqq, just easier to read.
Same as qqqqqqqqqq, just easier to read.
Same as qqqqqqqqqqq, just easier to read.
Apply two "and-then-able" functions in order to a value.