MonadEx v1.1.3 Monad protocol View Source

Monads are structures that represent computations as sequences of steps. –[Wikipedia](https://en.wikipedia.org/wiki/Monad_(functional_programming)

Monads are also able to encapsulate side-effects, such as IO and failure. Monads have two primary functions: bind and return. This protocol does not contain a return function due to the limitations of Elixir protocols. However, return can be found in Monad.Behaviour.

Link to this section Summary

Functions

Takes a monad value and a function that takes a value and returns a monad

Link to this section Types

Link to this section Functions

Link to this function bind(value, fun) View Source
bind(t(), (term() -> t())) :: t()

Takes a monad value and a function that takes a value and returns a monad.

In Haskell types: (>>=) :: m a -> (a -> m b) -> m b