Contents
- EitherTExtensions
- Action <L, M, A, B> (this EitherT<L, M, A> ma, K<EitherT<L, M>, B> mb)
- Action <L, M, A, B> (this K<EitherT<L, M>, A> ma, K<EitherT<L, M>, B> mb)
- Apply <L, M, A, B> (this EitherT<L, M, Func<A, B>> mf, K<EitherT<L, M>, A> ma)
- Apply <L, M, A, B> (this K<EitherT<L, M>, Func<A, B>> mf, K<EitherT<L, M>, A> ma)
- EitherTExtensions
- As <L, M, R> (this K<EitherT<L, M>, R> ma)
- As2 <L, M, R> (this K<EitherT<M>, L, R> ma)
- ToFin <M, R> (this K<EitherT<Error, M>, R> ma)
- Run <L, M, A> (this K<EitherT<L, M>, A> ma)
- Bind <L, M, A, B> (this K<EitherT<L, M>, A> ma, Func<A, IO<B>> f)
- Flatten <L, A> (this Task<EitherT<L, IO, A>> tma)
- ToIO <L, A> (this Task<Either<L, A>> ma)
- Flatten <L, M, A> (this EitherT<L, M, EitherT<L, M, A>> mma)
- Where <L, M, A> (this K<EitherT<L, M>, A> ma, Func<A, bool> pred)
- Filter <L, M, A> (this K<EitherT<L, M>, A> ma, Func<A, bool> pred)
- SelectMany <L, M, A, B, C> ( this K<M, A> ma, Func<A, K<EitherT<L, M>, B>> bind, Func<A, B, C> project)
- SelectMany <L, M, A, B, C> ( this K<M, A> ma, Func<A, EitherT<L, M, B>> bind, Func<A, B, C> project)
- Partition <F, L, M, R> (this K<F, EitherT<L, M, R>> self)
- Lefts <F, L, M, R> (this K<F, EitherT<L, M, R>> self)
- Rights <F, L, M, R> (this K<F, EitherT<L, M, R>> self)
- EitherTExtensions
- Map <L, M, A, B> (this Func<A, B> f, K<EitherT<L, M>, A> ma)
- Map <L, M, A, B> (this Func<A, B> f, EitherT<L, M, A> ma)
- EitherTGuardExtensions
class EitherTExtensions Source #
Methods
method EitherT<L, M, B> Action <L, M, A, B> (this EitherT<L, M, A> ma, K<EitherT<L, M>, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method EitherT<L, M, B> Action <L, M, A, B> (this K<EitherT<L, M>, A> ma, K<EitherT<L, M>, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method EitherT<L, M, B> Apply <L, M, A, B> (this EitherT<L, M, Func<A, B>> mf, K<EitherT<L, 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 EitherT<L, M, B> Apply <L, M, A, B> (this K<EitherT<L, M>, Func<A, B>> mf, K<EitherT<L, 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 | |
class EitherTExtensions Source #
EitherT monad-transformer extensions
Methods
method K<M, Either<L, A>> Run <L, M, A> (this K<EitherT<L, M>, A> ma) Source #
Runs the EitherT exposing the outer monad with an inner wrapped Either
method EitherT<L, M, B> Bind <L, M, A, B> (this K<EitherT<L, 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 EitherT<L, IO, A> Flatten <L, A> (this Task<EitherT<L, IO, A>> tma) Source #
Get the outer task and wrap it up in a new IO within the EitherT IO
method EitherT<L, M, A> Flatten <L, M, A> (this EitherT<L, M, EitherT<L, M, A>> mma) Source #
Monadic join
method EitherT<L, M, A> Where <L, M, A> (this K<EitherT<L, M>, A> ma, Func<A, bool> pred) Source #
Filtering based on predicate.
If the predicate returns false, then Left(L.Empty) is yielded and therefore L must be a monoid.
method EitherT<L, M, A> Filter <L, M, A> (this K<EitherT<L, M>, A> ma, Func<A, bool> pred) Source #
Filtering based on predicate.
If the predicate returns false, then Left(L.Empty) is yielded and therefore L must be a monoid.
method EitherT<L, M, C> SelectMany <L, M, A, B, C> ( this K<M, A> ma, Func<A, K<EitherT<L, 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 EitherT<L, M, C> SelectMany <L, M, A, B, C> ( this K<M, A> ma, Func<A, EitherT<L, 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 K<M, (Seq<L> Lefts, Seq<R> Rights)> Partition <F, L, M, R> (this K<F, EitherT<L, M, R>> self) Source #
Partitions a foldable of EitherT into two sequences.
All the Left elements are extracted, in order, to the first component of the output.
Similarly, the Right elements are extracted to the second component of the output.
Parameters
| returns | A pair containing the sequences of partitioned values | |
class EitherTExtensions Source #
Methods
method EitherT<L, M, B> Map <L, M, A, B> (this Func<A, B> f, K<EitherT<L, 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 EitherT<L, M, B> Map <L, M, A, B> (this Func<A, B> f, EitherT<L, 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 | |
class EitherTGuardExtensions Source #
Methods
method EitherT<L, M, Unit> ToEitherT <L, M> (this Guard<L, Unit> guard) Source #
Natural transformation to EitherT
method EitherT<L, M, B> Bind <L, M, B> ( this Guard<L, Unit> guard, Func<Unit, EitherT<L, M, B>> f) Source #
Monadic binding support for EitherT
method EitherT<L, M, C> SelectMany <L, M, B, C> ( this Guard<L, Unit> guard, Func<Unit, EitherT<L, M, B>> bind, Func<Unit, B, C> project) Source #
Monadic binding support for EitherT