mirror of
https://github.com/correl/elm-mdl.git
synced 2024-12-18 11:06:18 +00:00
12 lines
236 B
Elm
12 lines
236 B
Elm
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
|