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