-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
In Haskell: https://hackage.haskell.org/package/base-4.15.0.0/docs/Control-Monad.html#v:guard
expect : Bool -> Maybe ()
expect b = if b then Just () else Nothing
This is is used to short-circuit Maybe computations based on a condition:
Maybe.expect thisMustBeTrue |>
Maybe.andThen (\() ->
-- only run when the condition is true
)
Metadata
Metadata
Assignees
Labels
No labels