- Free <F, A>
- Map <B> (Func<A, B> f)
- Select <B> (Func<A, B> f)
- Bind <B> (Func<A, Free<F, B>> f)
- Bind <B> (Func<A, K<Free<F>, B>> f)
- SelectMany <B, C> (Func<A, K<Free<F>, B>> bind, Func<A, B, C> project)
- Pure <F, A> (A Value)
- Bind <F, A> (K<F, Free<F, A>> Value)
- FreeExtensions
- FreeExtensions
- Map <F, A, B> (this Func<A, B> f, K<Free<F>, A> ma)
- Map <F, A, B> (this Func<A, B> f, Free<F, A> ma)
- Action <F, A, B> (this Free<F, A> ma, K<Free<F>, B> mb)
- Action <F, A, B> (this K<Free<F>, A> ma, K<Free<F>, B> mb)
- Apply <F, A, B> (this Free<F, Func<A, B>> mf, K<Free<F>, A> ma)
- Apply <F, A, B> (this K<Free<F>, Func<A, B>> mf, K<Free<F>, A> ma)
- Free
- pure <F, A> (A value)
- lift <F, A> (K<F, A> value)
- bind <F, A> (K<F, Free<F, A>> value)
- hoist <F, G, A> (Free<F, A> fb)
- Free <F>
- Prelude
Free monad makes any functor into a monad
type | F | Functor type |
type | A | Bound value type |
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
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
type | F | Functor type |
type | A | Bound value type |
param | Value | Functor that yields a |
class FreeExtensions Source #
class FreeExtensions Source #
method Free<F, B> Map <F, A, B> (this Func<A, B> f, K<Free<F>, A> ma) Source #
Functor map operation
Unwraps the value within the functor, passes it to the map function f
provided, and
then takes the mapped value and wraps it back up into a new functor.
param | ma | Functor to map |
param | f | Mapping function |
returns | Mapped functor |
method Free<F, B> Map <F, A, B> (this Func<A, B> f, Free<F, A> ma) Source #
Functor map operation
Unwraps the value within the functor, passes it to the map function f
provided, and
then takes the mapped value and wraps it back up into a new functor.
param | ma | Functor to map |
param | f | Mapping function |
returns | Mapped functor |
method Free<F, B> Action <F, A, B> (this Free<F, A> ma, K<Free<F>, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method Free<F, B> Action <F, A, B> (this K<Free<F>, A> ma, K<Free<F>, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method Free<F, B> Apply <F, A, B> (this Free<F, Func<A, B>> mf, K<Free<F>, A> ma) Source #
Applicative functor apply operation
Unwraps the value within the ma
applicative-functor, passes it to the unwrapped function(s) within mf
, and
then takes the resulting value and wraps it back up into a new applicative-functor.
param | ma | Value(s) applicative functor |
param | mf | Mapping function(s) |
returns | Mapped applicative functor |
method Free<F, B> Apply <F, A, B> (this K<Free<F>, Func<A, B>> mf, K<Free<F>, A> ma) Source #
Applicative functor apply operation
Unwraps the value within the ma
applicative-functor, passes it to the unwrapped function(s) within mf
, and
then takes the resulting value and wraps it back up into a new applicative-functor.
param | ma | Value(s) applicative functor |
param | mf | Mapping function(s) |
returns | Mapped applicative functor |
method Free<F, A> pure <F, A> (A value) Source #
Terminal case for the free monad
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
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
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
.
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 |
method Free<F, B> map <F, A, B> (Func<A, B> f, K<Free<F>, A> ma) Source #
Functor map operation
Unwraps the value within the functor, passes it to the map function f
provided, and
then takes the mapped value and wraps it back up into a new functor.
param | ma | Functor to map |
param | f | Mapping function |
returns | Mapped functor |
method Free<F, B> action <F, A, B> (K<Free<F>, A> ma, K<Free<F>, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method Free<F, B> apply <F, A, B> (K<Free<F>, Func<A, B>> mf, K<Free<F>, A> ma) Source #
Applicative functor apply operation
Unwraps the value within the ma
applicative-functor, passes it to the unwrapped function(s) within mf
, and
then takes the resulting value and wraps it back up into a new applicative-functor.
param | ma | Value(s) applicative functor |
param | mf | Mapping function(s) |
returns | Mapped applicative functor |