- Try <A> (Func<Fin<A>> runTry)
- Succ (A value)
- Fail (Error value)
- Lift (Pure<A> pure)
- Lift (Fin<A> result)
- Lift (Func<Fin<A>> result)
- Lift (Func<A> result)
- Lift (Fail<Error> fail)
- Match <B> (Func<A, B> Succ, Func<Error, B> Fail)
- IfFail (Func<Error, A> Fail)
- IfFailM (Func<Error, Fin<A>> Fail)
- Map <B> (Func<A, B> f)
- MapFail (Func<Error, Error> f)
- Select <B> (Func<A, B> f)
- Bind <B> (Func<A, K<Try, B>> f)
- Bind <B> (Func<A, Try<B>> f)
- Bind <B> (Func<A, Pure<B>> f)
- BiBind <B> (Func<A, Try<B>> Succ, Func<Error, Try<B>> Fail)
- BindFail (Func<Error, Try<A>> Fail)
- SelectMany <B, C> (Func<A, K<Try, B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, Try<B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, Fin<B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, Pure<B>> bind, Func<A, B, C> project)
- + (Try<A> lhs, Try<A> rhs)
- + (Try<A> lhs, K<Try, A> rhs)
- + (K<Try, A> lhs, Try<A> rhs)
- + (Try<A> ma, Pure<A> mb)
- + (Try<A> ma, Fail<Error> mb)
- + (Try<A> ma, Fail<Exception> mb)
- + (Try<A> ma, Exception mb)
- | (Try<A> lhs, Try<A> rhs)
- | (Try<A> lhs, K<Try, A> rhs)
- | (K<Try, A> lhs, Try<A> rhs)
- | (Try<A> ma, Pure<A> mb)
- | (Try<A> ma, Fail<Error> mb)
- | (Try<A> ma, Fail<Exception> mb)
- | (Try<A> ma, Exception mb)
- | (Try<A> ma, CatchM<Error, Try, A> mb)
- Combine (Try<A> rhs)
- TryExtensions
- As <A> (this K<Try, A> ma)
- Run <A> (this K<Try, A> ma)
- Flatten <A> (this K<Try, Try<A>> mma)
- Flatten <A> (this K<Try, K<Try, A>> mma)
- TryExtensions
- Map <A, B> (this Func<A, B> f, K<Try, A> ma)
- Map <A, B> (this Func<A, B> f, Try<A> ma)
- Action <A, B> (this Try<A> ma, K<Try, B> mb)
- Action <A, B> (this K<Try, A> ma, K<Try, B> mb)
- Apply <A, B> (this Try<Func<A, B>> mf, K<Try, A> ma)
- Apply <A, B> (this K<Try, Func<A, B>> mf, K<Try, A> ma)
- Try
- Succ <A> (A value)
- Fail <A> (Error value)
- lift <A> (Func<Fin<A>> ma)
- lift <A> (Fin<A> ma)
- lift <A> (Pure<A> ma)
- lift <A> (Fail<Error> ma)
- lift <A> (Error ma)
- lift <A> (Func<A> f)
- match <A, B> (Try<A> ma, Func<A, B> Succ, Func<Error, B> Fail)
- Try
- Prelude
record Try <A> (Func<Fin<A>> runTry) Source #
TryT
monad transformer, which allows for an optional result.
type | M | Given monad trait |
type | A | Bound value type |
param | runEither | Transducer that represents the transformer operation |
method Try<A> Succ (A value) Source #
Lift a pure value into the monad-transformer
param | value | Value to lift |
returns |
|
method Try<A> Fail (Error value) Source #
Lift a fail value into the monad-transformer
param | value | Value to lift |
returns |
|
method Try<A> Lift (Pure<A> pure) Source #
Lifts a given monad into the transformer
param | pure | Monad to lift |
returns |
|
method Try<A> Lift (Fin<A> result) Source #
Lifts a given monad into the transformer
param | either | Monad to lift |
returns |
|
method Try<A> Lift (Func<Fin<A>> result) Source #
Lifts a given monad into the transformer
param | either | Monad to lift |
returns |
|
method Try<A> Lift (Func<A> result) Source #
Lifts a given monad into the transformer
param | either | Monad to lift |
returns |
|
method Try<A> Lift (Fail<Error> fail) Source #
Lifts a given monad into the transformer
param | fail | Monad to lift |
returns |
|
method B Match <B> (Func<A, B> Succ, Func<Error, B> Fail) Source #
Match the bound value and return a result (which gets packages back up inside the inner monad)
param | Succ | Success branch |
param | Fail | Fail branch |
returns | Inner monad with the result of the |
method A IfFail (Func<Error, A> Fail) Source #
Match the bound value and return a result (which gets packages back up inside the inner monad)
param | Succ | Success branch |
param | Fail | Fail branch |
returns | Inner monad with the result of the |
method Fin<A> IfFailM (Func<Error, Fin<A>> Fail) Source #
Match the bound value and return a result (which gets packages back up inside the inner monad)
param | Succ | Success branch |
param | Fail | Fail branch |
returns | Inner monad with the result of the |
method Try<B> Map <B> (Func<A, B> f) Source #
Maps the bound value
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method Try<A> MapFail (Func<Error, Error> f) Source #
Maps the bound value
param | f | Mapping function |
returns |
|
method Try<B> Select <B> (Func<A, B> f) Source #
Maps the bound value
type | B | Target bound value type |
param | f | Mapping transducer |
returns |
|
method Try<B> Bind <B> (Func<A, K<Try, B>> f) Source #
Monad bind operation
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method Try<B> Bind <B> (Func<A, Try<B>> f) Source #
Monad bind operation
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method Try<B> Bind <B> (Func<A, Pure<B>> f) Source #
Monad bind operation
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method Try<B> BiBind <B> (Func<A, Try<B>> Succ, Func<Error, Try<B>> Fail) Source #
Monad bind operation
type | B | Target bound value type |
param | Succ | Mapping function |
returns |
|
method Try<A> BindFail (Func<Error, Try<A>> Fail) Source #
Monad bind operation
type | B | Target bound value type |
param | Succ | Mapping function |
returns |
|
method Try<C> SelectMany <B, C> (Func<A, K<Try, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method Try<C> SelectMany <B, C> (Func<A, Try<B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method Try<C> SelectMany <B, C> (Func<A, Fin<B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method Try<C> SelectMany <B, C> (Func<A, Pure<B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
class TryExtensions Source #
Either monad extensions
class TryExtensions Source #
method Try<B> Map <A, B> (this Func<A, B> f, K<Try, 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 Try<B> Map <A, B> (this Func<A, B> f, Try<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 Try<B> Action <A, B> (this Try<A> ma, K<Try, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method Try<B> Action <A, B> (this K<Try, A> ma, K<Try, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method Try<B> Apply <A, B> (this Try<Func<A, B>> mf, K<Try, 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 Try<B> Apply <A, B> (this K<Try, Func<A, B>> mf, K<Try, 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 Try<B> map <A, B> (Func<A, B> f, K<Try, 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 Try<B> action <A, B> (K<Try, A> ma, K<Try, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method Try<B> apply <A, B> (K<Try, Func<A, B>> mf, K<Try, 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 |