Contents
- Reader <Env, A>
 - ReaderResult <A>
 - Bottom = new ReaderResult<A>()
 - IsFaulted
 - New (A value)
 - New (Error error)
 - Match <B> (Func<A, B> Succ, Func<Error, B> Fail)
 - Match (Action<A> Succ, Action<Error> Fail)
 - IfFail (A value)
 - IfFailThrow ()
 - ToOption ()
 - ToOptionUnsafe ()
 - ToOptionAsync ()
 - ToSeq ()
 - ToList ()
 - ToEither ()
 - ToEither <L> (Func<Error, L> Left)
 - ToEitherUnsafe ()
 - ToEitherUnsafe <L> (Func<Error, L> Left)
 - ToEitherAsync ()
 - ToEitherAsync <L> (Func<Error, L> Left)
 - ToTry ()
 - ToTryAsync ()
 - Equals (object obj)
 - GetHashCode ()
 - Equals (ReaderResult<A> right)
 - Equals (A right)
 - == (ReaderResult<A> left, A right)
 - != (ReaderResult<A> left, A right)
 - == (ReaderResult<A> left, ReaderResult<A> right)
 - != (ReaderResult<A> left, ReaderResult<A> right)
 - Deconstruct (out A Value, out Option<Error> Error)
 - ReaderExt
 - Flatten <Env, A> (this Reader<Env, Reader<Env, A>> ma)
 - Run <Env, A> (this Reader<Env, A> self, Env env)
 - AsEnumerable <Env, A> (this Reader<Env, A> self)
 - ToSeq <Env, A> (this Reader<Env, A> self, Env env)
 - ToList <Env, A> (this Reader<Env, A> self, Env env)
 - ToOption <Env, A> (this Reader<Env, A> self, Env env)
 - ToOptionUnsafe <Env, A> (this Reader<Env, A> self, Env env)
 - ToOptionAsync <Env, A> (this Reader<Env, A> self, Env env)
 - ToEither <Env, A> (this Reader<Env, A> self, Env env)
 - ToEither <Env, L, A> (this Reader<Env, A> self, Env env, Func<Error, L> Left)
 - ToEitherUnsafe <Env, A> (this Reader<Env, A> self, Env env)
 - ToEitherUnsafe <Env, L, A> (this Reader<Env, A> self, Env env, Func<Error, L> Left)
 - ToEitherAsync <Env, A> (this Reader<Env, A> self, Env env)
 - ToEitherAsync <Env, L, A> (this Reader<Env, A> self, Env env, Func<Error, L> Left)
 - ToTry <Env, A> (this Reader<Env, A> self, Env env)
 - ToTryAsync <Env, A> (this Reader<Env, A> self, Env env)
 - AsEnumerable <Env, A> (this Reader<Env, A> self, Env env)
 - Iter <Env, A> (this Reader<Env, A> self, Action<A> action)
 - Count <Env, T> (this Reader<Env, T> self)
 - Sum <Env> (this Reader<Env, int> self)
 - ForAll <Env, A> (this Reader<Env, A> self, Func<A, bool> pred)
 - Exists <Env, A> (this Reader<Env, A> self, Func<A, bool> pred)
 - Fold <Env, S, A> (this Reader<Env, A> self, S state, Func<S, A, S> folder)
 - Map <Env, A, R> (this Reader<Env, A> self, Func<A, R> mapper)
 - Strict <Env, A> (this Reader<Env, A> ma)
 - Do <Env, A> (this Reader<Env, A> ma, Action<A> f)
 - Bind <Env, A, B> (this Reader<Env, A> self, Func<A, Reader<Env, B>> binder)
 - Select <Env, A, B> (this Reader<Env, A> self, Func<A, B> map)
 - SelectMany <Env, A, B, C> ( this Reader<Env, A> self, Func<A, Reader<Env, B>> bind, Func<A, B, C> project)
 - Fold <Env, A> (this Reader<Env, A> self, Func<Env, A, Env> f)
 - Prelude
 - flatten <Env, A> (Reader<Env, Reader<Env, A>> ma)
 - Reader <Env, A> (A value)
 - Reader <Env, A> (Func<Env, A> f)
 - ReaderFail <Env, A> (string error)
 - ReaderFail <Env, A> (int code, string error)
 - ReaderFail <Env, A> (string error, Exception exception)
 - ReaderFail <Env, A> (Exception exception)
 - ask <Env> ()
 - asks <Env, R> (Func<Env, R> f)
 - local <Env, A> (Reader<Env, A> ma, Func<Env, Env> f)
 - choose <Env, A> (params Reader<Env, Option<A>>[] monads)
 - tryread <Env, A> (Reader<Env, A> m)
 - tryfun <Env, A> (Reader<Env, A> ma)
 
struct ReaderResult <A> Source #
Fields
field ReaderResult<A> Bottom = new ReaderResult<A>() Source #
Methods
method A IfFailThrow () Source #
method OptionUnsafe<A> ToOptionUnsafe () Source #
method OptionAsync<A> ToOptionAsync () Source #
method EitherUnsafe<Error, A> ToEitherUnsafe () Source #
method EitherUnsafe<L, A> ToEitherUnsafe <L> (Func<Error, L> Left) Source #
method EitherAsync<Error, A> ToEitherAsync () Source #
method EitherAsync<L, A> ToEitherAsync <L> (Func<Error, L> Left) Source #
method TryAsync<A> ToTryAsync () Source #
method int GetHashCode () Source #
method void Deconstruct (out A Value, out Option<Error> Error) Source #
Reader monad extensions
Methods
method ReaderResult<A> Run <Env, A> (this Reader<Env, A> self, Env env) Source #
Runs the Reader monad and memoizes the result in a TryOption monad. Use Match, IfSucc, IfNone, etc to extract.
method Reader<Env, Seq<A>> AsEnumerable <Env, A> (this Reader<Env, A> self) Source #
method OptionUnsafe<A> ToOptionUnsafe <Env, A> (this Reader<Env, A> self, Env env) Source #
method OptionAsync<A> ToOptionAsync <Env, A> (this Reader<Env, A> self, Env env) Source #
method Either<L, A> ToEither <Env, L, A> (this Reader<Env, A> self, Env env, Func<Error, L> Left) Source #
method EitherUnsafe<Error, A> ToEitherUnsafe <Env, A> (this Reader<Env, A> self, Env env) Source #
method EitherUnsafe<L, A> ToEitherUnsafe <Env, L, A> (this Reader<Env, A> self, Env env, Func<Error, L> Left) Source #
method EitherAsync<Error, A> ToEitherAsync <Env, A> (this Reader<Env, A> self, Env env) Source #
method EitherAsync<L, A> ToEitherAsync <Env, L, A> (this Reader<Env, A> self, Env env, Func<Error, L> Left) Source #
method TryAsync<A> ToTryAsync <Env, A> (this Reader<Env, A> self, Env env) Source #
method IEnumerable<A> AsEnumerable <Env, A> (this Reader<Env, A> self, Env env) Source #
method Reader<Env, S> Fold <Env, S, A> (this Reader<Env, A> self, S state, Func<S, A, S> folder) Source #
method Reader<Env, A> Strict <Env, A> (this Reader<Env, A> ma) Source #
Force evaluation of the monad (once only)
method Reader<Env, A> Do <Env, A> (this Reader<Env, A> ma, Action<A> f) Source #
Impure iteration of the bound value in the structure
Parameters
| returns | Returns the original unmodified structure  | |
method Reader<Env, B> Bind <Env, A, B> (this Reader<Env, A> self, Func<A, Reader<Env, B>> binder) Source #
method Reader<Env, C> SelectMany <Env, A, B, C> ( this Reader<Env, A> self, Func<A, Reader<Env, B>> bind, Func<A, B, C> project) Source #
Select Many
Methods
method Reader<Env, A> Reader <Env, A> (A value) Source #
Reader monad constructor
Parameters
| type | Env | Environment  | 
| type | A | Wrapped type  | 
| param | value | Wrapped value  | 
| returns | Reader monad  | |
method Reader<Env, A> Reader <Env, A> (Func<Env, A> f) Source #
Reader monad constructor
Parameters
| type | Env | Environment  | 
| type | A | Wrapped type  | 
| param | value | Wrapped value  | 
| returns | Reader monad  | |
method Reader<Env, A> ReaderFail <Env, A> (string error) Source #
Reader failure
method Reader<Env, A> ReaderFail <Env, A> (int code, string error) Source #
Reader failure
method Reader<Env, A> ReaderFail <Env, A> (string error, Exception exception) Source #
Reader failure
method Reader<Env, A> ReaderFail <Env, A> (Exception exception) Source #
Reader failure
method Reader<Env, Env> ask <Env> () Source #
Retrieves the reader monad environment.
Parameters
| type | Env | Environment  | 
| returns | Reader monad with the environment in as the bound value  | |
method Reader<Env, R> asks <Env, R> (Func<Env, R> f) Source #
Retrieves a function of the current environment.
Parameters
| type | Env | Environment  | 
| type | R | Bound and mapped value type  | 
| returns | Reader monad with the mapped environment in as the bound value  | |
method Reader<Env, A> local <Env, A> (Reader<Env, A> ma, Func<Env, Env> f) Source #
Executes a computation in a modified environment
Parameters
| param | f | The function to modify the environment.  | 
| param | m | Reader to modify  | 
| returns | Modified reader  | |
method Reader<Env, Option<A>> choose <Env, A> (params Reader<Env, Option<A>>[] monads) Source #
Chooses the first monad result that has a Some(x) for the value