Safe Haskell | Safe-Inferred |
---|
Documentation
obvious :: Applicative f => f ()Source
Synonym for pure ()
.
om :: Monad m => (a -> b -> m c) -> m a -> b -> m cSource
Combinator for working with monadic values:
>>>
om when (return True) $ print "Hello"
"Hello">>>
return True >>= flip when (print "Hello")
"Hello">>>
om forM_ (return [True]) print
True>>>
flip forM_ print =<< return [True]
True>>>
mapM_ print =<< return [True]
True
Subsumes the need for individual functions for whenM
, unlessM
, etc.
nom :: Monad m => (a -> b -> m c) -> a -> m b -> m cSource
Variant of om
which changes the roles of the 2nd and 3rd arguments.
>>>
nom mapM_ print $ return [True]
True>>>
mapM_ print =<< return [True]
True