Contents
- Monad <MA, A>
 - Monad <Env, Out, MA, A>
 - TypeClass
 - Return <MONAD, MA, A> (A x)
 - traverse <MonadA, MonadB, MA, MB, A, B> (MA ma, Func<A, B> f)
 - traverse <MonadA, MonadB, MA, MB, A, B> (MA ma, Func<A, MB> f)
 - traverse <Env, Out, MonadA, MonadB, MA, MB, A, B> (MA ma, Func<A, B> f)
 - traverse <Env, Out, MonadA, MonadB, MA, MB, A, B> (MA ma, Func<A, MB> f)
 - bind <MONADA, MONADB, MA, MB, A, B> (MA ma, Func<A, MB> f)
 - fail <MONAD, MA, A> (Exception err = null)
 - liftM <MONAD, FUNCTOR, MA, MB, A, B> (MA ma, Func<A, B> f)
 - join <EQ, MONADA, MONADB, MONADD, MA, MB, MD, A, B, C, D> ( MA self, MB inner, Func<A, C> outerKeyMap, Func<B, C> innerKeyMap, Func<A, B, D> project)
 - SelectMany <MONADA, MONADB, MONADC, MA, MB, MC, A, B, C> ( MA self, Func<A, MB> bind, Func<A, B, C> project)
 - SelectMany <MONADA, MA, A, B, C> ( MA self, Func<A, IEnumerable<B>> bind, Func<A, B, C> project)
 - SelectMany <MONADA, MA, A, B, C> ( MA self, Func<A, Seq<B>> bind, Func<A, B, C> project)
 - mzero <MPLUS, MA, A> ()
 - mplus <MPLUS, MA, A> (MA x, MA y)
 - msum <MPLUS, MA, A> (params MA[] xs)
 - msum <MPLUS, MA, A> (IEnumerable<MA> xs)
 - filter <MPLUS, MA, A> (MA ma, Func<A, bool> pred)
 
interface Monad <MA, A> Source #
Monad type-class
Parameters
| type | MA | The data-type to make monadic  | 
| type | A | The data-type bound value  | 
interface Monad <Env, Out, MA, A> Source #
Monad type-class
Parameters
| type | Env | The input type to the monadic computation  | 
| type | Out | The output type of the monadic computation  | 
| type | MA | The data-type to make monadic  | 
| type | A | The data-type bound value  | 
Methods
method MA Return <MONAD, MA, A> (A x) Source #
Monad return
Parameters
| type | A | Type of the bound monad value  | 
| param | x | The bound monad value  | 
| returns | Monad of A  | |
method MB traverse <MonadA, MonadB, MA, MB, A, B> (MA ma, Func<A, B> f) Source #
method MB traverse <MonadA, MonadB, MA, MB, A, B> (MA ma, Func<A, MB> f) Source #
method Func<Env, MB> traverse <Env, Out, MonadA, MonadB, MA, MB, A, B> (MA ma, Func<A, B> f) Source #
method Func<Env, MB> traverse <Env, Out, MonadA, MonadB, MA, MB, A, B> (MA ma, Func<A, MB> f) Source #
method MB bind <MONADA, MONADB, MA, MB, A, B> (MA ma, Func<A, MB> f) Source #
Monadic bind
Parameters
| type | B | Type of the bound return value  | 
| param | ma | Monad to bind  | 
| param | f | Bind function  | 
| returns | Monad of B  | |
method MA fail <MONAD, MA, A> (Exception err = null) Source #
Produce a failure value
method MB liftM <MONAD, FUNCTOR, MA, MB, A, B> (MA ma, Func<A, B> f) Source #
Performs a map operation on the monad
Parameters
| type | B | The mapped type  | 
| param | ma | Monad to map  | 
| param | f | Mapping operation  | 
| returns | Mapped monad  | |
method MD join <EQ, MONADA, MONADB, MONADD, MA, MB, MD, A, B, C, D> ( MA self, MB inner, Func<A, C> outerKeyMap, Func<B, C> innerKeyMap, Func<A, B, D> project) Source #
Monad join
method MC SelectMany <MONADA, MONADB, MONADC, MA, MB, MC, A, B, C> ( MA self, Func<A, MB> bind, Func<A, B, C> project) Source #
Monadic bind and project
method IEnumerable<C> SelectMany <MONADA, MA, A, B, C> ( MA self, Func<A, IEnumerable<B>> bind, Func<A, B, C> project) Source #
method Seq<C> SelectMany <MONADA, MA, A, B, C> ( MA self, Func<A, Seq<B>> bind, Func<A, B, C> project) Source #
method MA mzero <MPLUS, MA, A> () Source #
Return monad 'zero'. None for Option, [] for Lst, ...
Parameters
| type | MA | Monad type  | 
| type | A | Bound type  | 
| returns | Zero for the structure  | |
method MA mplus <MPLUS, MA, A> (MA x, MA y) Source #
Return monad x 'plus' monad y
Note, this doesn't add the bound values, it works on the monad state itself.
For example with Option:
None   'plus' None   = None
Some a 'plus' None   = Some a
None   'plus' Some b = Some b
Some a 'plus' Some b = Some a
Parameters
| type | MA | Monad type  | 
| type | A | Bound type  | 
| param | x | Left hand side of the operation  | 
| param | y | Right hand side of the operation  | 
| returns | x 'plus' y  | |
method MA msum <MPLUS, MA, A> (params MA[] xs) Source #
Performs the following fold operation: fold(xs, mzero, mplus)
Parameters
| type | MA | Monad type  | 
| type | A | Bound type  | 
| param | xs | The monads to sum  | 
| returns | The summed monads  | |