b0oh/elm-do/1.0.0

Do.Maybe

This library extends Maybe from elm-core with do function

do : Maybe a -> (a -> Maybe b) -> Maybe b
import Do.Maybe as Maybe


Maybe.do (Just 1) <| \x ->
Maybe.do (Just 2) <| \y ->
Just ( x, y )  -- (Just ( 1, 2 ))