Module

Data.These

Package
purescript-these
Repository
purescript-contrib/purescript-these

#These Source

data These a b

Constructors

Instances

#these Source

these :: forall c b a. (a -> c) -> (b -> c) -> (a -> b -> c) -> These a b -> c

#thisOrBoth Source

thisOrBoth :: forall b a. a -> Maybe b -> These a b

#thatOrBoth Source

thatOrBoth :: forall b a. b -> Maybe a -> These a b

#maybeThese Source

maybeThese :: forall b a. Maybe a -> Maybe b -> Maybe (These a b)

Takes a pair of Maybes and attempts to create a These from them.

#fromThese Source

fromThese :: forall b a. a -> b -> These a b -> Tuple a b

#theseLeft Source

theseLeft :: forall b a. These a b -> Maybe a

Returns an a value if possible.

#theseRight Source

theseRight :: forall b a. These a b -> Maybe b

Returns a b value if possible.

#this Source

this :: forall b a. These a b -> Maybe a

Returns the a value if and only if the value is constructed with This.

#that Source

that :: forall b a. These a b -> Maybe b

Returns the b value if and only if the value is constructed with That.