fay-0.19.1.2: A compiler for Fay, a Haskell subset that compiles to JavaScript.

Fay.Control.Monad.Extra

Description

Extra monadic functions.

Synopsis

bind :: Monad m => (a -> m b) -> m a -> m bSource

Word version of flip (>>=).

whenJust :: Monad m => Maybe a -> (a -> m ()) -> m ()Source

When the value is Just.

just :: Functor m => m a -> m (Maybe a)Source

Wrap up a form in a Maybe.

forMaybe :: [a] -> (a -> Maybe b) -> [b]Source

Flip of mapMaybe.

maybeM :: Monad m => a -> (a1 -> m a) -> Maybe a1 -> m aSource

Monadic version of maybe.

anyM :: Monad m => (a -> m Bool) -> [a] -> m BoolSource

Do any of the (monadic) predicates match?