hsdev-0.2.1.0: Haskell development library
Data.Maybe.JustIf
Synopsis
justIf :: a -> Bool -> Maybe a Source #
Return Just if True
Just
justWhen :: a -> (a -> Bool) -> Maybe a Source #
Return Just if f x = True
f x = True
soJust :: Bool -> a -> Maybe a Source #
Flipped version of justIf
justIf