Contents
- FinExtensions
- Action <A, B> (this Fin<A> ma, K<Fin, B> mb)
- Action <A, B> (this K<Fin, A> ma, K<Fin, B> mb)
- Apply <A, B> (this Fin<Func<A, B>> mf, K<Fin, A> ma)
- Apply <A, B> (this K<Fin, Func<A, B>> mf, K<Fin, A> ma)
- FinExtensions
- As <A> (this K<Fin, A> ma)
- ToFin <A> (this Either<Error, A> ma)
- Flatten <R> (this Fin<Fin<R>> ma)
- Plus <NUM, R> (this Fin<R> x, Fin<R> y)
- Subtract <NUM, R> (this Fin<R> x, Fin<R> y)
- Product <NUM, R> (this Fin<R> x, Fin<R> y)
- Divide <NUM, R> (this Fin<R> x, Fin<R> y)
- Partition <F, A> (this K<F, Fin<A>> self)
- Fails <F, A> (this K<F, Fin<A>> self)
- Succs <F, A> (this K<F, Fin<A>> self)
- FinExtensions
- FinGuardExtensions
class FinExtensions Source #
Methods
method Fin<B> Action <A, B> (this Fin<A> ma, K<Fin, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method Fin<B> Action <A, B> (this K<Fin, A> ma, K<Fin, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method Fin<B> Apply <A, B> (this Fin<Func<A, B>> mf, K<Fin, 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 Fin<B> Apply <A, B> (this K<Fin, Func<A, B>> mf, K<Fin, 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 FinExtensions Source #
Extension methods for Fin
Methods
method Fin<A> ToFin <A> (this Either<Error, A> ma) Source #
Natural transformation from Either to Fin
method Fin<R> Plus <NUM, R> (this Fin<R> x, Fin<R> y) Source #
Add the bound values of x and y, uses an Add trait to provide the add operation for type A. For example x.Add〈TInteger, int〉(y)
Parameters
| type | NUM | Num of A |
| type | A | Bound value type |
| param | x | Left hand side of the operation |
| param | y | Right hand side of the operation |
| returns | Fin with y added to x | |
method Fin<R> Subtract <NUM, R> (this Fin<R> x, Fin<R> y) Source #
Find the difference between the two bound values of x and y, uses a Subtract trait to provide the subtract operation for type A. For example x.Subtract〈TInteger, int〉(y)
Parameters
| type | NUM | Num of A |
| type | A | Bound value type |
| param | x | Left hand side of the operation |
| param | y | Right hand side of the operation |
| returns | Fin with the difference between x and y | |
method Fin<R> Product <NUM, R> (this Fin<R> x, Fin<R> y) Source #
Find the product between the two bound values of x and y, uses a Product trait to provide the product operation for type A. For example x.Product〈TInteger, int〉(y)
Parameters
| type | NUM | Num of A |
| type | A | Bound value type |
| param | x | Left hand side of the operation |
| param | y | Right hand side of the operation |
| returns | Fin with the product of x and y | |
method Fin<R> Divide <NUM, R> (this Fin<R> x, Fin<R> y) Source #
Divide the two bound values of x and y, uses a Divide trait to provide the divide operation for type A. For example x.Divide〈TDouble, double〉(y)
Parameters
| type | NUM | Num of A |
| type | A | Bound value type |
| param | x | Left hand side of the operation |
| param | y | Right hand side of the operation |
| returns | Fin x / y | |
method (Seq<Error> Fails, Seq<A> Succs) Partition <F, A> (this K<F, Fin<A>> self) Source #
Partitions a foldable of Fin into two sequences.
All the Fail elements are extracted, in order, to the first component of the output.
Similarly, the Succ elements are extracted to the second component of the output.
Parameters
| returns | A pair containing the sequences of partitioned values | |
class FinExtensions Source #
Methods
method Fin<B> Map <A, B> (this Func<A, B> f, K<Fin, 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 Fin<B> Map <A, B> (this Func<A, B> f, Fin<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 FinGuardExtensions Source #
Methods
method Fin<B> Bind <B> ( this Guard<Error, Unit> guard, Func<Unit, Fin<B>> f) Source #
Monadic binding support for Fin
method Fin<B> SelectMany <B> (this Guard<Error, Unit> ma, Func<Unit, Fin<B>> f) Source #
Monadic binding support for Fin
method Fin<C> SelectMany <B, C> ( this Guard<Error, Unit> ma, Func<Unit, Fin<B>> bind, Func<Unit, B, C> project) Source #
Monadic binding support for Fin