Contents
Methods
method Either<L, R> Right <L, R> (R value) Source #
Either constructor Constructs an Either in a Right state
Parameters
| type | L | Left |
| type | R | Right |
| param | value | Right value |
| returns | A new Either instance | |
method Pure<R> Right <R> (R value) Source #
Constructs an EitherRight which can be implicitly cast to an Either〈_, R〉
Parameters
| type | R | Right |
| param | value | Right value |
| returns | A new EitherRight instance | |
Methods
method Either<L, B> map <L, A, B> (Func<A, B> f, K<Either<L>, 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 Either<L, B> action <L, A, B> (K<Either<L>, A> ma, K<Either<L>, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method Either<L, B> apply <L, A, B> (K<Either<L>, Func<A, B>> mf, K<Either<L>, 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 | |