Contents
- OptionTExtensions
- As <M, A> (this K<OptionT<M>, A> ma)
- Run <M, A> (this K<OptionT<M>, A> ma)
- Bind <M, A, B> (this K<OptionT<M>, A> ma, Func<A, IO<B>> f)
- Flatten <A> (this Task<OptionT<IO, A>> tma)
- ToIO <A> (this Task<Option<A>> ma)
- Flatten <M, A> (this OptionT<M, OptionT<M, A>> mma)
- SelectMany <M, A, B, C> ( this K<M, A> ma, Func<A, K<OptionT<M>, B>> bind, Func<A, B, C> project)
- SelectMany <M, A, B, C> ( this K<M, A> ma, Func<A, OptionT<M, B>> bind, Func<A, B, C> project)
- SelectMany <M, A, B, C> ( this K<OptionT<M>, A> ma, Func<A, IO<B>> bind, Func<A, B, C> project)
- OptionTExtensions
- Map <M, A, B> (this Func<A, B> f, K<OptionT<M>, A> ma)
- Map <M, A, B> (this Func<A, B> f, OptionT<M, A> ma)
- Action <M, A, B> (this OptionT<M, A> ma, K<OptionT<M>, B> mb)
- Action <M, A, B> (this K<OptionT<M>, A> ma, K<OptionT<M>, B> mb)
- Apply <M, A, B> (this OptionT<M, Func<A, B>> mf, K<OptionT<M>, A> ma)
- Apply <M, A, B> (this K<OptionT<M>, Func<A, B>> mf, K<OptionT<M>, A> ma)
class OptionTExtensions Source #
OptionT monad-transformer extensions
Methods
method OptionT<M, B> Bind <M, A, B> (this K<OptionT<M>, A> ma, Func<A, IO<B>> f) Source #
Monad bind operation
Parameters
| type | B | Target bound value type |
| param | f | Mapping function |
| returns |
| |
method OptionT<IO, A> Flatten <A> (this Task<OptionT<IO, A>> tma) Source #
Get the outer task and wrap it up in a new IO within the OptionT IO
method OptionT<M, A> Flatten <M, A> (this OptionT<M, OptionT<M, A>> mma) Source #
Monadic join
method OptionT<M, C> SelectMany <M, A, B, C> ( this K<M, A> ma, Func<A, K<OptionT<M>, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
Parameters
| type | B | Intermediate bound value type |
| type | C | Target bound value type |
| param | bind | Monadic bind function |
| param | project | Projection function |
| returns |
| |
method OptionT<M, C> SelectMany <M, A, B, C> ( this K<M, A> ma, Func<A, OptionT<M, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
Parameters
| type | B | Intermediate bound value type |
| type | C | Target bound value type |
| param | bind | Monadic bind function |
| param | project | Projection function |
| returns |
| |
method OptionT<M, C> SelectMany <M, A, B, C> ( this K<OptionT<M>, A> ma, Func<A, IO<B>> bind, Func<A, B, C> project) Source #
Monad bind operation
Parameters
| type | B | Intermediate bound value type |
| type | C | Target bound value type |
| param | bind | Monadic bind function |
| param | project | Projection function |
| returns |
| |
class OptionTExtensions Source #
Methods
method OptionT<M, B> Map <M, A, B> (this Func<A, B> f, K<OptionT<M>, 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.
Parameters
| param | ma | Functor to map |
| param | f | Mapping function |
| returns | Mapped functor | |
method OptionT<M, B> Map <M, A, B> (this Func<A, B> f, OptionT<M, 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.
Parameters
| param | ma | Functor to map |
| param | f | Mapping function |
| returns | Mapped functor | |
method OptionT<M, B> Action <M, A, B> (this OptionT<M, A> ma, K<OptionT<M>, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method OptionT<M, B> Action <M, A, B> (this K<OptionT<M>, A> ma, K<OptionT<M>, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method OptionT<M, B> Apply <M, A, B> (this OptionT<M, Func<A, B>> mf, K<OptionT<M>, 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.
Parameters
| param | ma | Value(s) applicative functor |
| param | mf | Mapping function(s) |
| returns | Mapped applicative functor | |
method OptionT<M, B> Apply <M, A, B> (this K<OptionT<M>, Func<A, B>> mf, K<OptionT<M>, 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.
Parameters
| param | ma | Value(s) applicative functor |
| param | mf | Mapping function(s) |
| returns | Mapped applicative functor | |