elm-mdl/Material/Infix.elm

13 lines
236 B
Elm
Raw Normal View History

2016-03-08 16:30:09 +00:00
module Material.Infix where
import Maybe
(|?>): Maybe a -> (a -> b) -> Maybe b
(|?>) x f = Maybe.map f x
(|??>) : Maybe a -> (a -> Maybe b) -> Maybe b
(|??>) = Maybe.andThen
(|?) : Maybe a -> a -> a
(|?) x y = Maybe.withDefault y x