Contents
Sub modules
| Extensions |
| Operators |
| Prelude |
| Trait |
Free monad makes any functor into a monad
Parameters
| type | F | Functor type |
| type | A | Bound value type |
Methods
method Free<F, C> SelectMany <B, C> (Func<A, K<Free<F>, B>> bind, Func<A, B, C> project) Source #
record Pure <F, A> (A Value) Source #
Terminal case for the free monad
Parameters
| type | F | Functor type |
| type | A | Bound value type |
| param | Value | Terminal value |
record Bind <F, A> (K<F, Free<F, A>> Value) Source #
Monadic bind case for the free monad
Parameters
| type | F | Functor type |
| type | A | Bound value type |
| param | Value | Functor that yields a |
Methods
method Free<F, A> pure <F, A> (A value) Source #
Terminal case for the free monad
Parameters
| type | F | Functor type |
| type | A | Bound value type |
| param | value | Terminal value |
method Free<F, A> lift <F, A> (K<F, A> value) Source #
Lift the functor into the free monad
Parameters
| type | F | Functor type |
| type | A | Bound value type |
| param | value | Functor that yields a |
method Free<F, A> bind <F, A> (K<F, Free<F, A>> value) Source #
Monadic bind case for the free monad
Parameters
| type | F | Functor type |
| type | A | Bound value type |
| param | value | Functor that yields a |
method Free<G, A> hoist <F, G, A> (Free<F, A> fb) Source #
Lift a natural transformation from F to G into a natural-transformation from
Free F to Free G.
Parameters
| type | N | Natural transformation |
| type | F | Functor |
| type | G | Functor |
| type | A | Bound value type |
| param | fb | Free monad in F |
| returns | Free monad in G | |