incipit-base-0.3.0.0: A Prelude for Polysemy – Base Reexports
Safe HaskellSafe-Inferred
LanguageHaskell2010

Incipit.Misc

Description

Misc combinators.

Synopsis

Documentation

unit :: Applicative f => f () Source #

Convenience alias for pure ().

whenM :: Monad m => m Bool -> m () -> m () Source #

Variant of when that takes a monadic action for the condition.

unlessM :: Monad m => m Bool -> m () -> m () Source #

Variant of unless that takes a monadic action for the condition.

ifM :: Monad m => m Bool -> m a -> m a -> m a Source #

Variant of ifthenelse that takes a monadic action for the condition and branches.

foldl :: forall t b a. Foldable t => (b -> a -> b) -> b -> t a -> b Source #

Default to using the strict version since the lazy one is so controversial.