# Prelude.Monad

Monads and Functors

interface Monad
  (>>=) : Monad m => m a -> (a -> m b) -> m b

    Also called `bind`.

    Fixity
      Left associative, precedence 1
  join : Monad m => m (m a) -> m a

    Also called `flatten` or mu

default#>>= : Monad m => m a -> (a -> m b) -> m b
default#join : Monad m => m (m a) -> m a
foldlM : Foldable t => Monad m => (funcM : a -> b -> m a) -> (init : a) -> (input : t b) -> m a

  Similar to `foldl`, but uses a function wrapping its result in a `Monad`.
  Consequently, the final value is wrapped in the same `Monad`.

return : Monad m => a -> m a

  For compatibility with Haskell. Note that monads are not free to
  define `return` and `pure` differently!