LanguageExt.Core

LanguageExt.Core Class Instances Monad

Contents

struct MArr <A> Source #

Array type-class instance

Parameters

type A

Bound value type

Fields

Methods

method Arr<A> Append (Arr<A> x, Arr<A> y) Source #

method MB Bind <MONADB, MB, B> (Arr<A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Arr<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Func<Unit, int> Count (Arr<A> fa) Source #

method Arr<A> Empty () Source #

method bool Equals (Arr<A> x, Arr<A> y) Source #

method int Compare (Arr<A> x, Arr<A> y) Source #

method Arr<A> Fail (object err = null) Source #

method Func<Unit, S> Fold <S> (Arr<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (Arr<A> fa, S state, Func<S, A, S> f) Source #

method Arr<A> Plus (Arr<A> ma, Arr<A> mb) Source #

method Arr<A> Return (Func<Unit, A> f) Source #

method Arr<A> Return (A x) Source #

method Arr<A> Zero () Source #

method int GetHashCode (Arr<A> x) Source #

method Arr<A> Run (Func<Unit, Arr<A>> f) Source #

method Arr<A> BindReturn (Unit _, Arr<A> fmb) Source #

method Arr<A> Apply (Func<A, A, A> f, Arr<A> fa, Arr<A> fb) Source #

method Task<bool> EqualsAsync (Arr<A> x, Arr<A> y) Source #

method Task<int> GetHashCodeAsync (Arr<A> x) Source #

method Task<int> CompareAsync (Arr<A> x, Arr<A> y) Source #

struct MArray <A> Source #

Array type-class instance

Parameters

type A

Fields

Methods

method A[] Append (A[] x, A[] y) Source #

method MB Bind <MONADB, MB, B> (A[] ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (A[] ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Func<Unit, int> Count (A[] fa) Source #

method A[] Subtract (A[] x, A[] y) Source #

method A[] Empty () Source #

method bool Equals (A[] x, A[] y) Source #

method int Compare (A[] x, A[] y) Source #

method A[] Fail (object err = null) Source #

method Func<Unit, S> Fold <S> (A[] fa, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (A[] fa, S state, Func<S, A, S> f) Source #

method A[] Plus (A[] ma, A[] mb) Source #

method A[] Return (Func<Unit, A> x) Source #

method A[] Return (A x) Source #

method A[] Zero () Source #

method int GetHashCode (A[] x) Source #

method A[] Run (Func<Unit, A[]> ma) Source #

method A[] BindReturn (Unit _, A[] mb) Source #

method A[] Apply (Func<A, A, A> f, A[] fa, A[] fb) Source #

method Task<bool> EqualsAsync (A[] x, A[] y) Source #

method Task<int> GetHashCodeAsync (A[] x) Source #

method Task<int> CompareAsync (A[] x, A[] y) Source #

struct MEither <L, R> Source #

Fields

Properties

property Either<L, R> None Source #

Methods

method MB Bind <MONADB, MB, B> (Either<L, R> ma, Func<R, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Either<L, R> ma, Func<R, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Either<L, R> Fail (object err = null) Source #

method Either<L, R> Plus (Either<L, R> ma, Either<L, R> mb) Source #

method Either<L, R> Return (Func<Unit, R> f) Source #

method Either<L, R> Zero () Source #

method bool IsNone (Either<L, R> opt) Source #

method bool IsSome (Either<L, R> opt) Source #

method R2 Match <R2> (Either<L, R> opt, Func<R, R2> Some, Func<R2> None) Source #

method R2 MatchUnsafe <R2> (Either<L, R> opt, Func<R, R2> Some, R2 None) Source #

method R2 Match <R2> (Either<L, R> opt, Func<R, R2> Some, R2 None) Source #

method Unit Match (Either<L, R> opt, Action<R> Some, Action None) Source #

method R2 MatchUnsafe <R2> (Either<L, R> opt, Func<R, R2> Some, Func<R2> None) Source #

method Func<Unit, S> Fold <S> (Either<L, R> foldable, S state, Func<S, R, S> f) Source #

method Func<Unit, S> FoldBack <S> (Either<L, R> foldable, S state, Func<S, R, S> f) Source #

method S BiFold <S> (Either<L, R> foldable, S state, Func<S, L, S> fa, Func<S, R, S> fb) Source #

method S BiFoldBack <S> (Either<L, R> foldable, S state, Func<S, L, S> fa, Func<S, R, S> fb) Source #

method Func<Unit, int> Count (Either<L, R> ma) Source #

method Either<L, R> Some (R value) Source #

method Either<L, R> Optional (R value) Source #

method Either<L, R> Run (Func<Unit, Either<L, R>> ma) Source #

method Either<L, R> BindReturn (Unit _, Either<L, R> mb) Source #

method Either<L, R> Return (R x) Source #

method Either<L, R> Empty () Source #

method Either<L, R> Append (Either<L, R> x, Either<L, R> y) Source #

method bool IsLeft (Either<L, R> choice) Source #

method bool IsRight (Either<L, R> choice) Source #

method bool IsBottom (Either<L, R> choice) Source #

method C Match <C> (Either<L, R> choice, Func<L, C> Left, Func<R, C> Right, Func<C> Bottom = null) Source #

method Unit Match (Either<L, R> choice, Action<L> Left, Action<R> Right, Action Bottom = null) Source #

method C MatchUnsafe <C> (Either<L, R> choice, Func<L, C> Left, Func<R, C> Right, Func<C> Bottom = null) Source #

method Either<L, R> Apply (Func<R, R, R> f, Either<L, R> fa, Either<L, R> fb) Source #

method EitherAsync<L, R> ToAsync (Either<L, R> sa) Source #

struct MEitherAsync <L, R> Source #

Properties

property EitherAsync<L, R> None Source #

Methods

method EitherAsync<L, R> Append (EitherAsync<L, R> ma, EitherAsync<L, R> mb) Source #

method EitherAsync<L, R> Apply (Func<R, R, R> f, EitherAsync<L, R> ma, EitherAsync<L, R> mb) Source #

method Task<S> BiFold <S> (EitherAsync<L, R> ma, S state, Func<S, L, S> fa, Func<S, R, S> fb) Source #

method Task<S> BiFoldAsync <S> (EitherAsync<L, R> ma, S state, Func<S, L, Task<S>> fa, Func<S, R, S> fb) Source #

method Task<S> BiFoldAsync <S> (EitherAsync<L, R> ma, S state, Func<S, L, S> fa, Func<S, R, Task<S>> fb) Source #

method Task<S> BiFoldAsync <S> (EitherAsync<L, R> ma, S state, Func<S, L, Task<S>> fa, Func<S, R, Task<S>> fb) Source #

method Task<S> BiFoldBack <S> (EitherAsync<L, R> ma, S state, Func<S, L, S> fa, Func<S, R, S> fb) Source #

method Task<S> BiFoldBackAsync <S> (EitherAsync<L, R> ma, S state, Func<S, L, Task<S>> fa, Func<S, R, S> fb) Source #

method Task<S> BiFoldBackAsync <S> (EitherAsync<L, R> ma, S state, Func<S, L, S> fa, Func<S, R, Task<S>> fb) Source #

method Task<S> BiFoldBackAsync <S> (EitherAsync<L, R> ma, S state, Func<S, L, Task<S>> fa, Func<S, R, Task<S>> fb) Source #

method MB Bind <MONADB, MB, B> (EitherAsync<L, R> ma, Func<R, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (EitherAsync<L, R> ma, Func<R, Task<MB>> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method EitherAsync<L, R> BindReturn (Unit outputma, EitherAsync<L, R> mb) Source #

method Func<Unit, Task<int>> Count (EitherAsync<L, R> fa) Source #

method EitherAsync<L, R> Empty () Source #

method EitherAsync<L, R> Fail (object err = null) Source #

method Func<Unit, Task<S>> Fold <S> (EitherAsync<L, R> fa, S state, Func<S, R, S> f) Source #

method Func<Unit, Task<S>> FoldAsync <S> (EitherAsync<L, R> fa, S state, Func<S, R, Task<S>> f) Source #

method Func<Unit, Task<S>> FoldAsync <S> (EitherAsync<L, R> fa, S state, Func<S, L, S> f) Source #

method Func<Unit, Task<S>> FoldAsync <S> (EitherAsync<L, R> fa, S state, Func<S, L, Task<S>> f) Source #

method Func<Unit, Task<S>> FoldBack <S> (EitherAsync<L, R> fa, S state, Func<S, R, S> f) Source #

method Func<Unit, Task<S>> FoldBackAsync <S> (EitherAsync<L, R> fa, S state, Func<S, R, Task<S>> f) Source #

method Func<Unit, Task<S>> FoldBackAsync <S> (EitherAsync<L, R> fa, S state, Func<S, L, S> f) Source #

method Func<Unit, Task<S>> FoldBackAsync <S> (EitherAsync<L, R> fa, S state, Func<S, L, Task<S>> f) Source #

method Task<bool> IsNone (EitherAsync<L, R> ma) Source #

method Task<bool> IsSome (EitherAsync<L, R> ma) Source #

method Task<B> Match <B> (EitherAsync<L, R> ma, Func<R, B> Some, Func<B> None) Source #

method Task<B> MatchAsync <B> (EitherAsync<L, R> ma, Func<R, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchAsync <B> (EitherAsync<L, R> ma, Func<R, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchAsync <B> (EitherAsync<L, R> ma, Func<R, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

method Task<Unit> Match (EitherAsync<L, R> ma, Action<R> Some, Action None) Source #

method Task<Unit> MatchAsync (EitherAsync<L, R> ma, Func<R, Task> SomeAsync, Action None) Source #

method Task<Unit> MatchAsync (EitherAsync<L, R> ma, Action<R> Some, Func<Task> NoneAsync) Source #

method Task<Unit> MatchAsync (EitherAsync<L, R> ma, Func<R, Task> SomeAsync, Func<Task> NoneAsync) Source #

method Task<B> MatchUnsafe <B> (EitherAsync<L, R> ma, Func<R, B> Some, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (EitherAsync<L, R> ma, Func<R, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (EitherAsync<L, R> ma, Func<R, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchUnsafeAsync <B> (EitherAsync<L, R> ma, Func<R, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

method EitherAsync<L, R> Optional (R value) Source #

method EitherAsync<L, R> OptionalAsync (Task<R> value) Source #

method EitherAsync<L, R> Plus (EitherAsync<L, R> ma, EitherAsync<L, R> mb) Source #

method EitherAsync<L, R> ReturnAsync (Task<R> x) Source #

method EitherAsync<L, R> ReturnAsync (Func<Unit, Task<R>> f) Source #

method EitherAsync<L, R> RunAsync (Func<Unit, Task<EitherAsync<L, R>>> ma) Source #

method EitherAsync<L, R> Some (R value) Source #

method EitherAsync<L, R> SomeAsync (Task<R> value) Source #

method EitherAsync<L, R> Zero () Source #

method Task<bool> IsLeft (EitherAsync<L, R> choice) Source #

method Task<bool> IsRight (EitherAsync<L, R> choice) Source #

method Task<bool> IsBottom (EitherAsync<L, R> choice) Source #

method Task<C> Match <C> (EitherAsync<L, R> choice, Func<L, C> Left, Func<R, C> Right, Func<C> Bottom = null) Source #

method Task<C> MatchAsync <C> (EitherAsync<L, R> choice, Func<L, Task<C>> LeftAsync, Func<R, C> Right, Func<C> Bottom = null) Source #

method Task<C> MatchAsync <C> (EitherAsync<L, R> choice, Func<L, C> Left, Func<R, Task<C>> RightAsync, Func<C> Bottom = null) Source #

method Task<C> MatchAsync <C> (EitherAsync<L, R> choice, Func<L, Task<C>> LeftAsync, Func<R, Task<C>> RightAsync, Func<C> Bottom = null) Source #

method Task<Unit> Match (EitherAsync<L, R> choice, Action<L> Left, Action<R> Right, Action Bottom = null) Source #

method Task<Unit> MatchAsync (EitherAsync<L, R> choice, Func<L, Task> LeftAsync, Action<R> Right, Action Bottom = null) Source #

method Task<Unit> MatchAsync (EitherAsync<L, R> choice, Action<L> Left, Func<R, Task> RightAsync, Action Bottom = null) Source #

method Task<Unit> MatchAsync (EitherAsync<L, R> choice, Func<L, Task> LeftAsync, Func<R, Task> RightAsync, Action Bottom = null) Source #

method Task<C> MatchUnsafe <C> (EitherAsync<L, R> choice, Func<L, C> Left, Func<R, C> Right, Func<C> Bottom = null) Source #

method Task<C> MatchUnsafeAsync <C> (EitherAsync<L, R> choice, Func<L, Task<C>> LeftAsync, Func<R, C> Right, Func<C> Bottom = null) Source #

method Task<C> MatchUnsafeAsync <C> (EitherAsync<L, R> choice, Func<L, C> Left, Func<R, Task<C>> RightAsync, Func<C> Bottom = null) Source #

method Task<C> MatchUnsafeAsync <C> (EitherAsync<L, R> choice, Func<L, Task<C>> LeftAsync, Func<R, Task<C>> RightAsync, Func<C> Bottom = null) Source #

struct MEitherUnsafe <L, R> Source #

Fields

field MEitherUnsafe<L, R> Inst = default(MEitherUnsafe<L, R>) Source #

Properties

property EitherUnsafe<L, R> None Source #

Methods

method MB Bind <MONADB, MB, B> (EitherUnsafe<L, R> ma, Func<R, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (EitherUnsafe<L, R> ma, Func<R, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method EitherUnsafe<L, R> Fail (object err = null) Source #

method EitherUnsafe<L, R> Plus (EitherUnsafe<L, R> ma, EitherUnsafe<L, R> mb) Source #

method EitherUnsafe<L, R> Return (Func<Unit, R> f) Source #

method EitherUnsafe<L, R> Zero () Source #

method bool IsNone (EitherUnsafe<L, R> opt) Source #

method bool IsSome (EitherUnsafe<L, R> opt) Source #

method R2 MatchUnsafe <R2> (EitherUnsafe<L, R> opt, Func<R, R2> Some, Func<R2> None) Source #

method R2 MatchUnsafe <R2> (EitherUnsafe<L, R> opt, Func<R, R2> Some, R2 None) Source #

method Unit Match (EitherUnsafe<L, R> choice, Action<R> Right, Action Left) Source #

method Func<Unit, S> Fold <S> (EitherUnsafe<L, R> foldable, S state, Func<S, R, S> f) Source #

method Func<Unit, S> FoldBack <S> (EitherUnsafe<L, R> foldable, S state, Func<S, R, S> f) Source #

method S BiFold <S> (EitherUnsafe<L, R> foldable, S state, Func<S, L, S> fa, Func<S, R, S> fb) Source #

method S BiFoldBack <S> (EitherUnsafe<L, R> foldable, S state, Func<S, L, S> fa, Func<S, R, S> fb) Source #

method Func<Unit, int> Count (EitherUnsafe<L, R> ma) Source #

method EitherUnsafe<L, R> Some (R value) Source #

method EitherUnsafe<L, R> Optional (R value) Source #

method EitherUnsafe<L, R> Run (Func<Unit, EitherUnsafe<L, R>> ma) Source #

method EitherUnsafe<L, R> BindReturn (Unit _, EitherUnsafe<L, R> mb) Source #

method EitherUnsafe<L, R> Return (R x) Source #

method EitherUnsafe<L, R> Empty () Source #

method EitherUnsafe<L, R> Append (EitherUnsafe<L, R> x, EitherUnsafe<L, R> y) Source #

method bool IsLeft (EitherUnsafe<L, R> choice) Source #

method bool IsRight (EitherUnsafe<L, R> choice) Source #

method bool IsBottom (EitherUnsafe<L, R> choice) Source #

method C MatchUnsafe <C> (EitherUnsafe<L, R> choice, Func<L, C> Left, Func<R, C> Right, Func<C> Bottom = null) Source #

method Unit Match (EitherUnsafe<L, R> choice, Action<L> Left, Action<R> Right, Action Bottom = null) Source #

method EitherUnsafe<L, R> Apply (Func<R, R, R> f, EitherUnsafe<L, R> fa, EitherUnsafe<L, R> fb) Source #

struct MEnumerable <A> Source #

Enumerable type-class instance

Parameters

type A

Fields

Methods

method IEnumerable<A> Append (IEnumerable<A> x, IEnumerable<A> y) Source #

method MB Bind <MONADB, MB, B> (IEnumerable<A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (IEnumerable<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Func<Unit, int> Count (IEnumerable<A> fa) Source #

method IEnumerable<A> Subtract (IEnumerable<A> x, IEnumerable<A> y) Source #

method IEnumerable<A> Empty () Source #

method bool Equals (IEnumerable<A> x, IEnumerable<A> y) Source #

method int Compare (IEnumerable<A> x, IEnumerable<A> y) Source #

method IEnumerable<A> Fail (object err = null) Source #

method Func<Unit, S> Fold <S> (IEnumerable<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (IEnumerable<A> fa, S state, Func<S, A, S> f) Source #

method IEnumerable<A> Plus (IEnumerable<A> ma, IEnumerable<A> mb) Source #

method IEnumerable<A> Zero () Source #

method IEnumerable<A> Return (Func<Unit, A> f) Source #

method int GetHashCode (IEnumerable<A> x) Source #

method IEnumerable<A> Run (Func<Unit, IEnumerable<A>> ma) Source #

method IEnumerable<A> BindReturn (Unit maOutput, IEnumerable<A> mb) Source #

method IEnumerable<A> Return (A x) Source #

method MB Apply <MonadB, MB, B> (Func<A, A, B> faab, IEnumerable<A> fa, IEnumerable<A> fb) Source #

where MonadB : struct, Monad<Unit, Unit, MB, B>

method IEnumerable<A> Apply (Func<A, A, A> f, IEnumerable<A> fa, IEnumerable<A> fb) Source #

method Task<bool> EqualsAsync (IEnumerable<A> x, IEnumerable<A> y) Source #

method Task<int> GetHashCodeAsync (IEnumerable<A> x) Source #

method Task<int> CompareAsync (IEnumerable<A> x, IEnumerable<A> y) Source #

struct MFin <A> Source #

Fields

Properties

property Fin<A> None Source #

Methods

method MB Bind <MonadB, MB, B> (Fin<A> ma, Func<A, MB> f) Source #

where MonadB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MonadB, MB, B> (Fin<A> ma, Func<A, MB> f) Source #

where MonadB : struct, MonadAsync<Unit, Unit, MB, B>

method Fin<A> Fail (object err = null) Source #

method Fin<A> Plus (Fin<A> a, Fin<A> b) Source #

method Fin<A> Return (Func<Unit, A> f) Source #

method Fin<A> Zero () Source #

method Func<Unit, S> Fold <S> (Fin<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (Fin<A> ma, S state, Func<S, A, S> f) Source #

method S BiFold <S> (Fin<A> ma, S state, Func<S, A, S> fa, Func<S, Error, S> fb) Source #

method S BiFoldBack <S> (Fin<A> ma, S state, Func<S, A, S> fa, Func<S, Error, S> fb) Source #

method Func<Unit, int> Count (Fin<A> ma) Source #

method Fin<A> Run (Func<Unit, Fin<A>> ma) Source #

method Fin<A> BindReturn (Unit _, Fin<A> mb) Source #

method Fin<A> Return (A x) Source #

method Fin<A> Empty () Source #

method Fin<A> Append (Fin<A> x, Fin<A> y) Source #

method bool Equals (Fin<A> x, Fin<A> y) Source #

method int GetHashCode (Fin<A> x) Source #

method Fin<A> Apply (Func<A, A, A> f, Fin<A> fa, Fin<A> fb) Source #

method Task<bool> EqualsAsync (Fin<A> x, Fin<A> y) Source #

method Task<int> GetHashCodeAsync (Fin<A> x) Source #

method int Compare (Fin<A> x, Fin<A> y) Source #

method Task<int> CompareAsync (Fin<A> x, Fin<A> y) Source #

struct MHashSet <A> Source #

Hash set type-class instance

Parameters

type A

Fields

Methods

method HashSet<A> Append (HashSet<A> x, HashSet<A> y) Source #

method MB Bind <MONADB, MB, B> (HashSet<A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (HashSet<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Func<Unit, int> Count (HashSet<A> fa) Source #

method HashSet<A> Subtract (HashSet<A> x, HashSet<A> y) Source #

method HashSet<A> Empty () Source #

method bool Equals (HashSet<A> x, HashSet<A> y) Source #

method HashSet<A> Fail (object err = null) Source #

method Func<Unit, S> Fold <S> (HashSet<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (HashSet<A> fa, S state, Func<S, A, S> f) Source #

method HashSet<A> Plus (HashSet<A> ma, HashSet<A> mb) Source #

method HashSet<A> Return (Func<Unit, A> f) Source #

method HashSet<A> Zero () Source #

method int GetHashCode (HashSet<A> x) Source #

method HashSet<A> Run (Func<Unit, HashSet<A>> ma) Source #

method HashSet<A> BindReturn (Unit maOutput, HashSet<A> mb) Source #

method HashSet<A> Return (A x) Source #

method HashSet<A> Apply (Func<A, A, A> f, HashSet<A> fa, HashSet<A> fb) Source #

method Task<bool> EqualsAsync (HashSet<A> x, HashSet<A> y) Source #

method Task<int> GetHashCodeAsync (HashSet<A> x) Source #

struct MIdentity <A> Source #

Parameters

type A

Fields

field MIdentity<A> Inst = new MIdentity<A>() Source #

Methods

method MB Bind <MONADB, MB, B> (Identity<A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Identity<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Identity<A> BindReturn (Unit maOutput, Identity<A> mb) Source #

method Func<Unit, int> Count (Identity<A> fa) Source #

method Identity<A> Fail (object err = null) Source #

method Func<Unit, S> Fold <S> (Identity<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (Identity<A> fa, S state, Func<S, A, S> f) Source #

method Identity<A> Run (Func<Unit, Identity<A>> ma) Source #

method Identity<A> Plus (Identity<A> a, Identity<A> b) Source #

method Identity<A> Return (Func<Unit, A> f) Source #

method Identity<A> Zero () Source #

method Identity<A> Return (A x) Source #

method Identity<A> Apply (Func<A, A, A> f, Identity<A> fa, Identity<A> fb) Source #

method Task<A> ToAsync (Identity<A> sa) Source #

struct MLst <A> Source #

MLst type-class instance

Parameters

type A

Bound value type

Fields

Methods

method Lst<A> Append (Lst<A> x, Lst<A> y) Source #

method MB Bind <MONADB, MB, B> (Lst<A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Lst<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Func<Unit, int> Count (Lst<A> fa) Source #

method Lst<A> Subtract (Lst<A> x, Lst<A> y) Source #

method Lst<A> Empty () Source #

method bool Equals (Lst<A> x, Lst<A> y) Source #

method int Compare (Lst<A> x, Lst<A> y) Source #

method Lst<A> Fail (object err = null) Source #

method Func<Unit, S> Fold <S> (Lst<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (Lst<A> fa, S state, Func<S, A, S> f) Source #

method Lst<A> Plus (Lst<A> ma, Lst<A> mb) Source #

method Lst<A> Return (Func<Unit, A> f) Source #

method Lst<A> Zero () Source #

method int GetHashCode (Lst<A> x) Source #

method Lst<A> Run (Func<Unit, Lst<A>> ma) Source #

method Lst<A> BindReturn (Unit maOutput, Lst<A> mb) Source #

method Lst<A> Return (A x) Source #

method Lst<A> Apply (Func<A, A, A> f, Lst<A> fa, Lst<A> fb) Source #

method Task<bool> EqualsAsync (Lst<A> x, Lst<A> y) Source #

method Task<int> GetHashCodeAsync (Lst<A> x) Source #

method Task<int> CompareAsync (Lst<A> x, Lst<A> y) Source #

struct MNullable <A> Source #

where A : struct

Fields

Properties

property A? None Source #

Methods

method MB Bind <MONADB, MB, B> (A? ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (A? ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method A? Fail (object err = null) Source #

method A? Plus (A? a, A? b) Source #

method A? Return (Func<Unit, A> f) Source #

method A? Zero () Source #

method bool IsNone (A? ma) Source #

method bool IsSome (A? ma) Source #

method Unit Match (A? ma, Action<A> Some, Action None) Source #

method B Match <B> (A? ma, Func<A, B> Some, Func<B> None) Source #

method B Match <B> (A? ma, Func<A, B> Some, B None) Source #

method B MatchUnsafe <B> (A? ma, Func<A, B> Some, Func<B> None) Source #

method B MatchUnsafe <B> (A? ma, Func<A, B> Some, B None) Source #

method Func<Unit, S> Fold <S> (A? ma, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (A? ma, S state, Func<S, A, S> f) Source #

method S BiFold <S> (A? ma, S state, Func<S, A, S> fa, Func<S, Unit, S> fb) Source #

method S BiFoldBack <S> (A? ma, S state, Func<S, A, S> fa, Func<S, Unit, S> fb) Source #

method Func<Unit, int> Count (A? ma) Source #

method A? Some (A value) Source #

method A? Optional (A value) Source #

method A? Run (Func<Unit, A?> ma) Source #

method A? BindReturn (Unit _, A? mb) Source #

method A? Return (A x) Source #

method A? Apply (Func<A, A, A> f, A? fa, A? fb) Source #

method int Compare (A? x, A? y) Source #

method bool Equals (A? x, A? y) Source #

method int GetHashCode (A? x) Source #

method Task<bool> EqualsAsync (A? x, A? y) Source #

method Task<int> GetHashCodeAsync (A? x) Source #

method Task<int> CompareAsync (A? x, A? y) Source #

struct MOption <A> Source #

Fields

Properties

property Option<A> None Source #

Methods

method MB Bind <MonadB, MB, B> (Option<A> ma, Func<A, MB> f) Source #

where MonadB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MonadB, MB, B> (Option<A> ma, Func<A, MB> f) Source #

where MonadB : struct, MonadAsync<Unit, Unit, MB, B>

method Option<A> Fail (object err = null) Source #

method Option<A> Plus (Option<A> a, Option<A> b) Source #

method Option<A> Return (Func<Unit, A> f) Source #

method Option<A> Zero () Source #

method bool IsNone (Option<A> opt) Source #

method bool IsSome (Option<A> opt) Source #

method B Match <B> (Option<A> opt, Func<A, B> Some, Func<B> None) Source #

method B Match <B> (Option<A> opt, Func<A, B> Some, B None) Source #

method Unit Match (Option<A> opt, Action<A> Some, Action None) Source #

method B MatchUnsafe <B> (Option<A> opt, Func<A, B> Some, Func<B> None) Source #

method B MatchUnsafe <B> (Option<A> opt, Func<A, B> Some, B None) Source #

method Func<Unit, S> Fold <S> (Option<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (Option<A> ma, S state, Func<S, A, S> f) Source #

method S BiFold <S> (Option<A> ma, S state, Func<S, A, S> fa, Func<S, Unit, S> fb) Source #

method S BiFoldBack <S> (Option<A> ma, S state, Func<S, A, S> fa, Func<S, Unit, S> fb) Source #

method Func<Unit, int> Count (Option<A> ma) Source #

method Option<A> Some (A x) Source #

method Option<A> Optional (A x) Source #

method Option<A> Run (Func<Unit, Option<A>> ma) Source #

method Option<A> BindReturn (Unit _, Option<A> mb) Source #

method Option<A> Return (A x) Source #

method Option<A> Empty () Source #

method Option<A> Append (Option<A> x, Option<A> y) Source #

method bool Equals (Option<A> x, Option<A> y) Source #

method int GetHashCode (Option<A> x) Source #

method Option<A> Apply (Func<A, A, A> f, Option<A> fa, Option<A> fb) Source #

method int Compare (Option<A> x, Option<A> y) Source #

method OptionAsync<A> ToAsync (Option<A> sa) Source #

method Task<bool> EqualsAsync (Option<A> x, Option<A> y) Source #

method Task<int> GetHashCodeAsync (Option<A> x) Source #

method Task<int> CompareAsync (Option<A> x, Option<A> y) Source #

struct MOptionAsync <A> Source #

Fields

Properties

property OptionAsync<A> None Source #

Methods

method MB Bind <MonadB, MB, B> (OptionAsync<A> ma, Func<A, MB> f) Source #

where MonadB : struct, MonadAsync<Unit, Unit, MB, B>

method MB BindAsync <MonadB, MB, B> (OptionAsync<A> ma, Func<A, Task<MB>> f) Source #

where MonadB : struct, MonadAsync<Unit, Unit, MB, B>

method OptionAsync<A> Fail (object err = null) Source #

method OptionAsync<A> Plus (OptionAsync<A> a, OptionAsync<A> b) Source #

method OptionAsync<A> ReturnAsync (Func<Unit, Task<A>> f) Source #

method OptionAsync<A> Zero () Source #

method Task<bool> IsNone (OptionAsync<A> opt) Source #

method Task<bool> IsSome (OptionAsync<A> opt) Source #

method Task<B> Match <B> (OptionAsync<A> opt, Func<A, B> Some, Func<B> None) Source #

method Task<B> MatchAsync <B> (OptionAsync<A> opt, Func<A, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchAsync <B> (OptionAsync<A> opt, Func<A, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchAsync <B> (OptionAsync<A> opt, Func<A, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

method Task<Unit> Match (OptionAsync<A> opt, Action<A> Some, Action None) Source #

method Task<Unit> MatchAsync (OptionAsync<A> opt, Func<A, Task> SomeAsync, Action None) Source #

method Task<Unit> MatchAsync (OptionAsync<A> opt, Action<A> Some, Func<Task> NoneAsync) Source #

method Task<Unit> MatchAsync (OptionAsync<A> opt, Func<A, Task> SomeAsync, Func<Task> NoneAsync) Source #

method Task<B> MatchUnsafe <B> (OptionAsync<A> opt, Func<A, B> Some, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (OptionAsync<A> opt, Func<A, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (OptionAsync<A> opt, Func<A, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchUnsafeAsync <B> (OptionAsync<A> opt, Func<A, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

method OptionAsync<A> Some (A value) Source #

method OptionAsync<A> SomeAsync (Task<A> taskA) Source #

method OptionAsync<A> Optional (A value) Source #

method OptionAsync<A> OptionalAsync (Task<A> taskA) Source #

method OptionAsync<A> BindReturn (Unit _, OptionAsync<A> mb) Source #

method OptionAsync<A> ReturnAsync (Task<A> x) Source #

method OptionAsync<A> RunAsync (Func<Unit, Task<OptionAsync<A>>> ma) Source #

method OptionAsync<A> Empty () Source #

method OptionAsync<A> Append (OptionAsync<A> x, OptionAsync<A> y) Source #

method Func<Unit, Task<S>> Fold <S> (OptionAsync<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldAsync <S> (OptionAsync<A> ma, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<S>> FoldBack <S> (OptionAsync<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldBackAsync <S> (OptionAsync<A> ma, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<int>> Count (OptionAsync<A> ma) Source #

method Task<S> BiFold <S> (OptionAsync<A> ma, S state, Func<S, A, S> fa, Func<S, Unit, S> fb) Source #

method Task<S> BiFoldAsync <S> (OptionAsync<A> ma, S state, Func<S, A, S> fa, Func<S, Unit, Task<S>> fb) Source #

method Task<S> BiFoldAsync <S> (OptionAsync<A> ma, S state, Func<S, A, Task<S>> fa, Func<S, Unit, S> fb) Source #

method Task<S> BiFoldAsync <S> (OptionAsync<A> ma, S state, Func<S, A, Task<S>> fa, Func<S, Unit, Task<S>> fb) Source #

method Task<S> BiFoldBack <S> (OptionAsync<A> ma, S state, Func<S, A, S> fa, Func<S, Unit, S> fb) Source #

method Task<S> BiFoldBackAsync <S> (OptionAsync<A> ma, S state, Func<S, A, S> fa, Func<S, Unit, Task<S>> fb) Source #

method Task<S> BiFoldBackAsync <S> (OptionAsync<A> ma, S state, Func<S, A, Task<S>> fa, Func<S, Unit, S> fb) Source #

method Task<S> BiFoldBackAsync <S> (OptionAsync<A> ma, S state, Func<S, A, Task<S>> fa, Func<S, Unit, Task<S>> fb) Source #

method OptionAsync<A> Apply (Func<A, A, A> f, OptionAsync<A> fa, OptionAsync<A> fb) Source #

struct MOptionUnsafe <A> Source #

Fields

field MOptionUnsafe<A> Inst = default(MOptionUnsafe<A>) Source #

Properties

property OptionUnsafe<A> None Source #

Methods

method MB Bind <MONADB, MB, B> (OptionUnsafe<A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (OptionUnsafe<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method OptionUnsafe<A> Fail (object err = null) Source #

method OptionUnsafe<A> Plus (OptionUnsafe<A> a, OptionUnsafe<A> b) Source #

method OptionUnsafe<A> Return (Func<Unit, A> f) Source #

method OptionUnsafe<A> Zero () Source #

method bool IsNone (OptionUnsafe<A> opt) Source #

method bool IsSome (OptionUnsafe<A> opt) Source #

method B MatchUnsafe <B> (OptionUnsafe<A> opt, Func<A, B> Some, Func<B> None) Source #

method B MatchUnsafe <B> (OptionUnsafe<A> opt, Func<A, B> Some, B None) Source #

method Unit Match (OptionUnsafe<A> opt, Action<A> Some, Action None) Source #

method Func<Unit, S> Fold <S> (OptionUnsafe<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (OptionUnsafe<A> ma, S state, Func<S, A, S> f) Source #

method S BiFold <S> (OptionUnsafe<A> ma, S state, Func<S, A, S> fa, Func<S, Unit, S> fb) Source #

method S BiFoldBack <S> (OptionUnsafe<A> ma, S state, Func<S, A, S> fa, Func<S, Unit, S> fb) Source #

method Func<Unit, int> Count (OptionUnsafe<A> ma) Source #

method OptionUnsafe<A> Some (A x) Source #

method OptionUnsafe<A> Optional (A x) Source #

method OptionUnsafe<A> Run (Func<Unit, OptionUnsafe<A>> ma) Source #

method OptionUnsafe<A> BindReturn (Unit _, OptionUnsafe<A> mb) Source #

method OptionUnsafe<A> Return (A x) Source #

method OptionUnsafe<A> Empty () Source #

method OptionUnsafe<A> Append (OptionUnsafe<A> x, OptionUnsafe<A> y) Source #

method bool Equals (OptionUnsafe<A> x, OptionUnsafe<A> y) Source #

method int GetHashCode (OptionUnsafe<A> x) Source #

method OptionUnsafe<A> Apply (Func<A, A, A> f, OptionUnsafe<A> fa, OptionUnsafe<A> fb) Source #

method Task<bool> EqualsAsync (OptionUnsafe<A> x, OptionUnsafe<A> y) Source #

method Task<int> GetHashCodeAsync (OptionUnsafe<A> x) Source #

struct MQue <A> Source #

MQue type-class instance

Parameters

type A

Bound value type

Fields

Methods

method Que<A> Append (Que<A> x, Que<A> y) Source #

method MB Bind <MONADB, MB, B> (Que<A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Que<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Func<Unit, int> Count (Que<A> fa) Source #

method Que<A> Subtract (Que<A> x, Que<A> y) Source #

method Que<A> Empty () Source #

method bool Equals (Que<A> x, Que<A> y) Source #

method Que<A> Fail (object err = null) Source #

method Func<Unit, S> Fold <S> (Que<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (Que<A> fa, S state, Func<S, A, S> f) Source #

method Que<A> Plus (Que<A> ma, Que<A> mb) Source #

method Que<A> Return (Func<Unit, A> f) Source #

method Que<A> Zero () Source #

method int GetHashCode (Que<A> x) Source #

method Que<A> Run (Func<Unit, Que<A>> ma) Source #

method Que<A> BindReturn (Unit _, Que<A> mb) Source #

method Que<A> Return (A x) Source #

method Que<A> Apply (Func<A, A, A> f, Que<A> fa, Que<A> fb) Source #

method Task<bool> EqualsAsync (Que<A> x, Que<A> y) Source #

method Task<int> GetHashCodeAsync (Que<A> x) Source #

struct MReader <Env, A> Source #

Fields

field MReader<Env, A> Inst = new MReader<Env, A>() Source #

Methods

method MB Bind <MONADB, MB, B> (Reader<Env, A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Env, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Reader<Env, A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Env, Unit, MB, B>

method Reader<Env, A> Fail (object err = null) Source #

method Reader<Env, A> Reader (Func<Env, A> f) Source #

method Reader<Env, Env> Ask () Source #

method Reader<Env, A> Local (Reader<Env, A> ma, Func<Env, Env> f) Source #

method Reader<Env, A> Return (Func<Env, A> f) Source #

method Reader<Env, A> Run (Func<Env, Reader<Env, A>> f) Source #

method Reader<Env, A> Plus (Reader<Env, A> ma, Reader<Env, A> mb) Source #

method Reader<Env, A> Zero () Source #

method Func<Env, S> Fold <S> (Reader<Env, A> fa, S state, Func<S, A, S> f) Source #

method Func<Env, S> FoldBack <S> (Reader<Env, A> fa, S state, Func<S, A, S> f) Source #

method Func<Env, int> Count (Reader<Env, A> fa) Source #

method Reader<Env, A> BindReturn (Unit _, Reader<Env, A> mb) Source #

method Reader<Env, A> Apply (Func<A, A, A> f, Reader<Env, A> fa, Reader<Env, A> fb) Source #

struct MRWS <MonoidW, R, W, S, A> Source #

where MonoidW : struct, Monoid<W>

Methods

method RWS<MonoidW, R, W, S, A> Apply (Func<A, A, A> f, RWS<MonoidW, R, W, S, A> fa, RWS<MonoidW, R, W, S, A> fb) Source #

method RWS<MonoidW, R, W, S, R> Ask () Source #

method MB Bind <MONADB, MB, B> (RWS<MonoidW, R, W, S, A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<(R Env, S State), RWSState<W, S>, MB, B>

method MB BindAsync <MONADB, MB, B> (RWS<MonoidW, R, W, S, A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<(R Env, S State), RWSState<W, S>, MB, B>

method RWS<MonoidW, R, W, S, A> BindReturn (RWSState<W, S> previous, RWS<MonoidW, R, W, S, A> mb) Source #

method Func<(R Env, S State), int> Count (RWS<MonoidW, R, W, S, A> fa) Source #

method RWS<MonoidW, R, W, S, A> Fail (object err = null) Source #

method Func<(R Env, S State), S1> Fold <S1> (RWS<MonoidW, R, W, S, A> fa, S1 initialValue, Func<S1, A, S1> f) Source #

method Func<(R Env, S State), S1> FoldBack <S1> (RWS<MonoidW, R, W, S, A> fa, S1 state, Func<S1, A, S1> f) Source #

method RWS<MonoidW, R, W, S, A> Run (Func<(R Env, S State), RWS<MonoidW, R, W, S, A>> ma) Source #

method RWS<MonoidW, R, W, S, A> Local (RWS<MonoidW, R, W, S, A> ma, Func<R, R> f) Source #

method RWS<MonoidW, R, W, S, A> Plus (RWS<MonoidW, R, W, S, A> ma, RWS<MonoidW, R, W, S, A> mb) Source #

method RWS<MonoidW, R, W, S, A> Return (Func<(R Env, S State), A> f) Source #

method RWS<MonoidW, R, W, S, A> Zero () Source #

method RWS<MonoidW, R, W, S, S> Get () Source #

method RWS<MonoidW, R, W, S, Unit> Put (S state) Source #

method RWS<MonoidW, R, W, S, Unit> Tell (W what) Source #

method RWS<MonoidW, R, W, S, (A, B)> Listen <B> (RWS<MonoidW, R, W, S, A> ma, Func<W, B> f) Source #

struct MSeq <A> Source #

Seq type-class instance

Parameters

type A

Fields

Methods

method Seq<A> Append (Seq<A> x, Seq<A> y) Source #

method MB Bind <MONADB, MB, B> (Seq<A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Seq<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Func<Unit, int> Count (Seq<A> fa) Source #

method Seq<A> Subtract (Seq<A> x, Seq<A> y) Source #

method Seq<A> Empty () Source #

method bool Equals (Seq<A> x, Seq<A> y) Source #

method Seq<A> Fail (object err = null) Source #

method Func<Unit, S> Fold <S> (Seq<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (Seq<A> fa, S state, Func<S, A, S> f) Source #

method Seq<A> Plus (Seq<A> ma, Seq<A> mb) Source #

method Seq<A> Zero () Source #

method Seq<A> Return (Func<Unit, A> f) Source #

method int GetHashCode (Seq<A> x) Source #

method Seq<A> Run (Func<Unit, Seq<A>> ma) Source #

method Seq<A> BindReturn (Unit maOutput, Seq<A> mb) Source #

method Seq<A> Return (A x) Source #

method Seq<A> Apply (Func<A, A, A> f, Seq<A> fa, Seq<A> fb) Source #

method Task<bool> EqualsAsync (Seq<A> x, Seq<A> y) Source #

method Task<int> GetHashCodeAsync (Seq<A> x) Source #

struct MSet <A> Source #

Set type-class instance

Parameters

type A

Fields

Methods

method Set<A> Append (Set<A> x, Set<A> y) Source #

method MB Bind <MONADB, MB, B> (Set<A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Set<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Func<Unit, int> Count (Set<A> fa) Source #

method Set<A> Subtract (Set<A> x, Set<A> y) Source #

method Set<A> Empty () Source #

method bool Equals (Set<A> x, Set<A> y) Source #

method Set<A> Fail (object err = null) Source #

method Func<Unit, S> Fold <S> (Set<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (Set<A> fa, S state, Func<S, A, S> f) Source #

method Set<A> Plus (Set<A> ma, Set<A> mb) Source #

method Set<A> Return (Func<Unit, A> f) Source #

method Set<A> Zero () Source #

method int GetHashCode (Set<A> x) Source #

method Set<A> Return (A x) Source #

method Set<A> Run (Func<Unit, Set<A>> ma) Source #

method Set<A> BindReturn (Unit _, Set<A> mb) Source #

method Set<A> Apply (Func<A, A, A> f, Set<A> fa, Set<A> fb) Source #

method Task<bool> EqualsAsync (Set<A> x, Set<A> y) Source #

method Task<int> GetHashCodeAsync (Set<A> x) Source #

struct MState <S, A> Source #

Methods

method MB Bind <MONADB, MB, B> (State<S, A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<S, (S State, bool IsFaulted), MB, B>

method MB BindAsync <MONADB, MB, B> (State<S, A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<S, (S State, bool IsFaulted), MB, B>

method State<S, A> BindReturn ((S State, bool IsFaulted) output, State<S, A> mb) Source #

method State<S, A> Fail (object err = null) Source #

method State<S, S> Get () Source #

method State<S, Unit> Put (S state) Source #

method State<S, A> Return (Func<S, A> f) Source #

method State<S, A> Plus (State<S, A> ma, State<S, A> mb) Source #

method State<S, A> Zero () Source #

method Func<S, FoldState> Fold <FoldState> (State<S, A> fa, FoldState initialState, Func<FoldState, A, FoldState> f) Source #

method Func<S, FoldState> FoldBack <FoldState> (State<S, A> fa, FoldState state, Func<FoldState, A, FoldState> f) Source #

method Func<S, int> Count (State<S, A> fa) Source #

method State<S, A> Run (Func<S, State<S, A>> ma) Source #

method State<S, A> State (Func<S, A> f) Source #

method State<S, A> Apply (Func<A, A, A> f, State<S, A> fa, State<S, A> fb) Source #

struct MStck <A> Source #

MStack type-class instance

Parameters

type A

Bound value type

Fields

Methods

method Stck<A> Append (Stck<A> x, Stck<A> y) Source #

method MB Bind <MONADB, MB, B> (Stck<A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Stck<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Func<Unit, int> Count (Stck<A> fa) Source #

method Stck<A> Subtract (Stck<A> x, Stck<A> y) Source #

method Stck<A> Empty () Source #

method bool Equals (Stck<A> x, Stck<A> y) Source #

method Stck<A> Fail (object err = null) Source #

method Func<Unit, S> Fold <S> (Stck<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (Stck<A> fa, S state, Func<S, A, S> f) Source #

method Stck<A> Plus (Stck<A> ma, Stck<A> mb) Source #

method Stck<A> Return (Func<Unit, A> f) Source #

method Stck<A> Zero () Source #

method int GetHashCode (Stck<A> x) Source #

method Stck<A> Run (Func<Unit, Stck<A>> ma) Source #

method Stck<A> BindReturn (Unit _, Stck<A> mb) Source #

method Stck<A> Return (A x) Source #

method Stck<A> Apply (Func<A, A, A> f, Stck<A> fa, Stck<A> fb) Source #

method Task<bool> EqualsAsync (Stck<A> x, Stck<A> y) Source #

method Task<int> GetHashCodeAsync (Stck<A> x) Source #

struct MTask <A> Source #

Class instance to give Task<A> the following traits:

MonadAsync
FoldableAsync
BiFoldableAsync
OptionalAsymc
OptionalUnsafeAsync

The Plus function will return ma if successful, mb otherwise

Parameters

type A

Bound value type

Fields

Properties

property Task<A> None Source #

Methods

method MB Bind <MONADB, MB, B> (Task<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Task<A> ma, Func<A, Task<MB>> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Task<A> Fail (object err = null) Source #

method Task<A> Plus (Task<A> ma, Task<A> mb) Source #

The Plus function will return ma if successful, mb otherwise

method Task<A> ReturnAsync (Task<A> x) Source #

Monad return

Parameters

type A

Type of the bound monad value

param x

The bound monad value

returns

Monad of A

method Task<A> ReturnAsync (Func<Unit, Task<A>> f) Source #

Monad return

Parameters

type A

Type of the bound monad value

returns

Monad of A

method Task<A> Zero () Source #

method Task<bool> IsNone (Task<A> ma) Source #

method Task<bool> IsSome (Task<A> ma) Source #

method Task<B> Match <B> (Task<A> ma, Func<A, B> Some, Func<B> None) Source #

method Task<A> Some (A value) Source #

method Task<A> Optional (A value) Source #

method Task<A> BindReturn (Unit _, Task<A> mb) Source #

method Task<A> RunAsync (Func<Unit, Task<Task<A>>> ma) Source #

method Func<Unit, Task<S>> Fold <S> (Task<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldAsync <S> (Task<A> fa, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<S>> FoldBack <S> (Task<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldBackAsync <S> (Task<A> fa, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<int>> Count (Task<A> fa) Source #

method Task<A> Apply (Func<A, A, A> f, Task<A> fa, Task<A> fb) Source #

method Task<B> MatchAsync <B> (Task<A> ma, Func<A, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchAsync <B> (Task<A> ma, Func<A, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchAsync <B> (Task<A> ma, Func<A, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchUnsafe <B> (Task<A> ma, Func<A, B> Some, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (Task<A> ma, Func<A, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (Task<A> ma, Func<A, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchUnsafeAsync <B> (Task<A> ma, Func<A, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

method Task<Unit> Match (Task<A> ma, Action<A> Some, Action None) Source #

method Task<Unit> MatchAsync (Task<A> ma, Func<A, Task> SomeAsync, Action None) Source #

method Task<Unit> MatchAsync (Task<A> ma, Action<A> SomeAsync, Func<Task> NoneAsync) Source #

method Task<Unit> MatchAsync (Task<A> ma, Func<A, Task> SomeAsync, Func<Task> NoneAsync) Source #

method Task<A> SomeAsync (Task<A> value) Source #

method Task<A> OptionalAsync (Task<A> value) Source #

method Task<S> BiFold <S> (Task<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, S> None) Source #

method Task<S> BiFoldAsync <S> (Task<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, S> None) Source #

method Task<S> BiFoldAsync <S> (Task<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldAsync <S> (Task<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldBack <S> (Task<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, S> None) Source #

method Task<S> BiFoldBackAsync <S> (Task<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, S> None) Source #

method Task<S> BiFoldBackAsync <S> (Task<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldBackAsync <S> (Task<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, Task<S>> NoneAsync) Source #

struct MTaskFirst <A> Source #

Class instance to give Task<A> the following traits:

MonadAsync
FoldableAsync
BiFoldableAsync
OptionalAsymc
OptionalUnsafeAsync

The Plus function will allow ma and mb to run in parallel and will return the result of the first to complete successfully.

Parameters

type A

Bound value type

Fields

Properties

property Task<A> None Source #

Methods

method MB Bind <MONADB, MB, B> (Task<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Task<A> ma, Func<A, Task<MB>> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Task<A> Fail (object err = null) Source #

method Task<A> Plus (Task<A> ma, Task<A> mb) Source #

The Plus function will allow ma and mb to run in parallel and will return the result of the first to complete successfully.

method Task<A> ReturnAsync (Task<A> x) Source #

Monad return

Parameters

type A

Type of the bound monad value

param x

The bound monad value

returns

Monad of A

method Task<A> ReturnAsync (Func<Unit, Task<A>> f) Source #

Monad return

Parameters

type A

Type of the bound monad value

returns

Monad of A

method Task<A> Zero () Source #

method Task<bool> IsNone (Task<A> ma) Source #

method Task<bool> IsSome (Task<A> ma) Source #

method Task<B> Match <B> (Task<A> ma, Func<A, B> Some, Func<B> None) Source #

method Task<A> Some (A value) Source #

method Task<A> Optional (A value) Source #

method Task<A> BindReturn (Unit _, Task<A> mb) Source #

method Task<A> RunAsync (Func<Unit, Task<Task<A>>> ma) Source #

method Func<Unit, Task<S>> Fold <S> (Task<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldAsync <S> (Task<A> fa, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<S>> FoldBack <S> (Task<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldBackAsync <S> (Task<A> fa, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<int>> Count (Task<A> fa) Source #

method Task<A> Apply (Func<A, A, A> f, Task<A> fa, Task<A> fb) Source #

method Task<B> MatchAsync <B> (Task<A> ma, Func<A, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchAsync <B> (Task<A> ma, Func<A, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchAsync <B> (Task<A> ma, Func<A, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

method Task<Unit> Match (Task<A> ma, Action<A> Some, Action None) Source #

method Task<Unit> MatchAsync (Task<A> ma, Func<A, Task> SomeAsync, Action None) Source #

method Task<Unit> MatchAsync (Task<A> ma, Action<A> Some, Func<Task> None) Source #

method Task<Unit> MatchAsync (Task<A> ma, Func<A, Task> SomeAsync, Func<Task> NoneAsync) Source #

method Task<A> SomeAsync (Task<A> value) Source #

method Task<A> OptionalAsync (Task<A> value) Source #

method Task<S> BiFold <S> (Task<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, S> None) Source #

method Task<S> BiFoldAsync <S> (Task<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, S> None) Source #

method Task<S> BiFoldAsync <S> (Task<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldAsync <S> (Task<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldBack <S> (Task<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, S> None) Source #

method Task<S> BiFoldBackAsync <S> (Task<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, S> None) Source #

method Task<S> BiFoldBackAsync <S> (Task<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldBackAsync <S> (Task<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<B> MatchUnsafe <B> (Task<A> ma, Func<A, B> Some, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (Task<A> ma, Func<A, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (Task<A> ma, Func<A, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchUnsafeAsync <B> (Task<A> ma, Func<A, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

struct MTaskSerial <A> Source #

Class instance to give Task<A> the following traits:

MonadAsync
FoldableAsync
BiFoldableAsync
OptionalAsymc
OptionalUnsafeAsync

The Plus function will run ma and mb in serial and will return the result of mb

Parameters

type A

Bound value type

Fields

field MTaskSerial<A> Inst = default Source #

Properties

property Task<A> None Source #

Methods

method MB Bind <MONADB, MB, B> (Task<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Task<A> ma, Func<A, Task<MB>> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Task<A> Fail (object err = null) Source #

method Task<A> Plus (Task<A> ma, Task<A> mb) Source #

The Plus function will run ma and mb in serial and will return the result of mb

method Task<A> ReturnAsync (Task<A> x) Source #

Monad return

Parameters

type A

Type of the bound monad value

param x

The bound monad value

returns

Monad of A

method Task<A> ReturnAsync (Func<Unit, Task<A>> f) Source #

Monad return

Parameters

type A

Type of the bound monad value

returns

Monad of A

method Task<A> Zero () Source #

method Task<bool> IsNone (Task<A> ma) Source #

method Task<bool> IsSome (Task<A> ma) Source #

method Task<B> Match <B> (Task<A> ma, Func<A, B> Some, Func<B> None) Source #

method Task<A> Some (A value) Source #

method Task<A> Optional (A value) Source #

method Task<A> BindReturn (Unit _, Task<A> mb) Source #

method Task<A> RunAsync (Func<Unit, Task<Task<A>>> ma) Source #

method Func<Unit, Task<S>> Fold <S> (Task<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldAsync <S> (Task<A> fa, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<S>> FoldBack <S> (Task<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldBackAsync <S> (Task<A> fa, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<int>> Count (Task<A> fa) Source #

method Task<A> Apply (Func<A, A, A> f, Task<A> fa, Task<A> fb) Source #

method Task<B> MatchAsync <B> (Task<A> ma, Func<A, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchAsync <B> (Task<A> ma, Func<A, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchAsync <B> (Task<A> ma, Func<A, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchUnsafe <B> (Task<A> ma, Func<A, B> Some, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (Task<A> ma, Func<A, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (Task<A> ma, Func<A, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchUnsafeAsync <B> (Task<A> ma, Func<A, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

method Task<Unit> Match (Task<A> ma, Action<A> Some, Action None) Source #

method Task<Unit> MatchAsync (Task<A> ma, Func<A, Task> SomeAsync, Action None) Source #

method Task<Unit> MatchAsync (Task<A> ma, Action<A> SomeAsync, Func<Task> NoneAsync) Source #

method Task<Unit> MatchAsync (Task<A> ma, Func<A, Task> SomeAsync, Func<Task> NoneAsync) Source #

method Task<A> SomeAsync (Task<A> value) Source #

method Task<A> OptionalAsync (Task<A> value) Source #

method Task<S> BiFold <S> (Task<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, S> None) Source #

method Task<S> BiFoldAsync <S> (Task<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, S> None) Source #

method Task<S> BiFoldAsync <S> (Task<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldAsync <S> (Task<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldBack <S> (Task<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, S> None) Source #

method Task<S> BiFoldBackAsync <S> (Task<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, S> None) Source #

method Task<S> BiFoldBackAsync <S> (Task<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldBackAsync <S> (Task<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, Task<S>> NoneAsync) Source #

struct MTry <A> Source #

Fields

Properties

property Try<A> None Source #

Methods

method MB Bind <MONADB, MB, B> (Try<A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Try<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Try<A> Fail (object err = null) Source #

method Try<A> Plus (Try<A> ma, Try<A> mb) Source #

method Try<A> Return (Func<Unit, A> f) Source #

Monad return

Parameters

type A

Type of the bound monad value

param x

The bound monad value

returns

Monad of A

method Try<A> Zero () Source #

method bool IsNone (Try<A> opt) Source #

method bool IsSome (Try<A> opt) Source #

method B Match <B> (Try<A> opt, Func<A, B> Some, Func<B> None) Source #

method B Match <B> (Try<A> opt, Func<A, B> Some, B None) Source #

method Unit Match (Try<A> opt, Action<A> Some, Action None) Source #

method B MatchUnsafe <B> (Try<A> opt, Func<A, B> Some, Func<B> None) Source #

method B MatchUnsafe <B> (Try<A> opt, Func<A, B> Some, B None) Source #

method Func<Unit, S> Fold <S> (Try<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (Try<A> ma, S state, Func<S, A, S> f) Source #

method S BiFold <S> (Try<A> ma, S state, Func<S, A, S> fa, Func<S, Unit, S> fb) Source #

method S BiFoldBack <S> (Try<A> ma, S state, Func<S, A, S> fa, Func<S, Unit, S> fb) Source #

method Func<Unit, int> Count (Try<A> ma) Source #

method Try<A> Some (A value) Source #

method Try<A> Optional (A value) Source #

method Try<A> Run (Func<Unit, Try<A>> ma) Source #

method Try<A> BindReturn (Unit _, Try<A> mb) Source #

method Try<A> Return (A x) Source #

method Try<A> Empty () Source #

method Try<A> Append (Try<A> x, Try<A> y) Source #

method Try<A> Apply (Func<A, A, A> f, Try<A> fa, Try<A> fb) Source #

method TryAsync<A> ToAsync (Try<A> sa) Source #

method bool IsLeft (Try<A> choice) Source #

method bool IsRight (Try<A> choice) Source #

method bool IsBottom (Try<A> choice) Source #

method C Match <C> (Try<A> choice, Func<Exception, C> Left, Func<A, C> Right, Func<C> Bottom = null) Source #

method Unit Match (Try<A> choice, Action<Exception> Left, Action<A> Right, Action Bottom = null) Source #

struct MTryAsync <A> Source #

Fields

Properties

property TryAsync<A> None Source #

Methods

method MB Bind <MONADB, MB, B> (TryAsync<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (TryAsync<A> ma, Func<A, Task<MB>> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method TryAsync<A> RunAsync (Func<Unit, Task<TryAsync<A>>> ma) Source #

method TryAsync<A> BindReturn (Unit _, TryAsync<A> mb) Source #

method TryAsync<A> Fail (object err = null) Source #

method TryAsync<A> Plus (TryAsync<A> ma, TryAsync<A> mb) Source #

method TryAsync<A> ReturnAsync (Func<Unit, Task<A>> f) Source #

Monad return

Parameters

type A

Type of the bound monad value

returns

Monad of A

method TryAsync<A> ReturnAsync (Task<A> x) Source #

Monad return

Parameters

type A

Type of the bound monad value

param x

The bound monad value

returns

Monad of A

method TryAsync<A> Zero () Source #

method Task<B> Match <B> (TryAsync<A> opt, Func<A, B> Some, Func<B> None) Source #

method Task<B> MatchAsync <B> (TryAsync<A> opt, Func<A, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchAsync <B> (TryAsync<A> opt, Func<A, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchAsync <B> (TryAsync<A> opt, Func<A, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

method Task<Unit> Match (TryAsync<A> opt, Action<A> Some, Action None) Source #

method Task<Unit> MatchAsync (TryAsync<A> opt, Func<A, Task> SomeAsync, Action None) Source #

method Task<Unit> MatchAsync (TryAsync<A> opt, Action<A> Some, Func<Task> NoneAsync) Source #

method Task<Unit> MatchAsync (TryAsync<A> opt, Func<A, Task> SomeAsync, Func<Task> NoneAsync) Source #

method Task<B> MatchUnsafe <B> (TryAsync<A> opt, Func<A, B> Some, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (TryAsync<A> opt, Func<A, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (TryAsync<A> opt, Func<A, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchUnsafeAsync <B> (TryAsync<A> opt, Func<A, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

method Func<Unit, Task<S>> Fold <S> (TryAsync<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldAsync <S> (TryAsync<A> ma, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<S>> FoldBack <S> (TryAsync<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldBackAsync <S> (TryAsync<A> ma, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<int>> Count (TryAsync<A> ma) Source #

method Task<bool> IsNone (TryAsync<A> opt) Source #

method Task<bool> IsSome (TryAsync<A> opt) Source #

method TryAsync<A> Some (A value) Source #

method TryAsync<A> SomeAsync (Task<A> value) Source #

method TryAsync<A> Optional (A value) Source #

method TryAsync<A> OptionalAsync (Task<A> value) Source #

method TryAsync<A> Empty () Source #

method TryAsync<A> Append (TryAsync<A> x, TryAsync<A> y) Source #

method Task<S> BiFold <S> (TryAsync<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, S> None) Source #

method Task<S> BiFoldAsync <S> (TryAsync<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, S> None) Source #

method Task<S> BiFoldAsync <S> (TryAsync<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldAsync <S> (TryAsync<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldBack <S> (TryAsync<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, S> None) Source #

method Task<S> BiFoldBackAsync <S> (TryAsync<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, S> None) Source #

method Task<S> BiFoldBackAsync <S> (TryAsync<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldBackAsync <S> (TryAsync<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, Task<S>> NoneAsync) Source #

method TryAsync<A> Apply (Func<A, A, A> f, TryAsync<A> fa, TryAsync<A> fb) Source #

struct MTryFirstAsync <A> Source #

Fields

field MTryFirstAsync<A> Inst = default(MTryFirstAsync<A>) Source #

Properties

property TryAsync<A> None Source #

Methods

method MB Bind <MONADB, MB, B> (TryAsync<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (TryAsync<A> ma, Func<A, Task<MB>> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method TryAsync<A> RunAsync (Func<Unit, Task<TryAsync<A>>> ma) Source #

method TryAsync<A> BindReturn (Unit _, TryAsync<A> mb) Source #

method TryAsync<A> Fail (object err = null) Source #

method TryAsync<A> Plus (TryAsync<A> ma, TryAsync<A> mb) Source #

method TryAsync<A> ReturnAsync (Func<Unit, Task<A>> f) Source #

Monad return

Parameters

type A

Type of the bound monad value

returns

Monad of A

method TryAsync<A> ReturnAsync (Task<A> x) Source #

Monad return

Parameters

type A

Type of the bound monad value

param x

The bound monad value

returns

Monad of A

method TryAsync<A> Zero () Source #

method Task<B> Match <B> (TryAsync<A> opt, Func<A, B> Some, Func<B> None) Source #

method Task<B> MatchAsync <B> (TryAsync<A> opt, Func<A, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchAsync <B> (TryAsync<A> opt, Func<A, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchAsync <B> (TryAsync<A> opt, Func<A, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

method Task<Unit> Match (TryAsync<A> opt, Action<A> Some, Action None) Source #

method Task<Unit> MatchAsync (TryAsync<A> opt, Func<A, Task> SomeAsync, Action None) Source #

method Task<Unit> MatchAsync (TryAsync<A> opt, Action<A> Some, Func<Task> NoneAsync) Source #

method Task<Unit> MatchAsync (TryAsync<A> opt, Func<A, Task> SomeAsync, Func<Task> NoneAsync) Source #

method Task<B> MatchUnsafe <B> (TryAsync<A> opt, Func<A, B> Some, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (TryAsync<A> opt, Func<A, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (TryAsync<A> opt, Func<A, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchUnsafeAsync <B> (TryAsync<A> opt, Func<A, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

method Func<Unit, Task<S>> Fold <S> (TryAsync<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldAsync <S> (TryAsync<A> ma, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<S>> FoldBack <S> (TryAsync<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldBackAsync <S> (TryAsync<A> ma, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<int>> Count (TryAsync<A> ma) Source #

method Task<bool> IsNone (TryAsync<A> opt) Source #

method Task<bool> IsSome (TryAsync<A> opt) Source #

method TryAsync<A> Some (A value) Source #

method TryAsync<A> SomeAsync (Task<A> value) Source #

method TryAsync<A> Optional (A value) Source #

method TryAsync<A> OptionalAsync (Task<A> value) Source #

method TryAsync<A> Empty () Source #

method TryAsync<A> Append (TryAsync<A> x, TryAsync<A> y) Source #

method Task<S> BiFold <S> (TryAsync<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, S> None) Source #

method Task<S> BiFoldAsync <S> (TryAsync<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, S> None) Source #

method Task<S> BiFoldAsync <S> (TryAsync<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldAsync <S> (TryAsync<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldBack <S> (TryAsync<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, S> None) Source #

method Task<S> BiFoldBackAsync <S> (TryAsync<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, S> None) Source #

method Task<S> BiFoldBackAsync <S> (TryAsync<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldBackAsync <S> (TryAsync<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, Task<S>> NoneAsync) Source #

method TryAsync<A> Apply (Func<A, A, A> f, TryAsync<A> fa, TryAsync<A> fb) Source #

struct MTryOption <A> Source #

Fields

Properties

property TryOption<A> None Source #

Methods

method MB Bind <MONADB, MB, B> (TryOption<A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (TryOption<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method TryOption<A> Fail (object err = null) Source #

method TryOption<A> Plus (TryOption<A> ma, TryOption<A> mb) Source #

method TryOption<A> Return (Func<Unit, A> f) Source #

Monad return

Parameters

type A

Type of the bound monad value

param x

The bound monad value

returns

Monad of A

method TryOption<A> Zero () Source #

method bool IsNone (TryOption<A> opt) Source #

method bool IsSome (TryOption<A> opt) Source #

method B Match <B> (TryOption<A> opt, Func<A, B> Some, Func<B> None) Source #

method B Match <B> (TryOption<A> opt, Func<A, B> Some, B None) Source #

method Unit Match (TryOption<A> opt, Action<A> Some, Action None) Source #

method B MatchUnsafe <B> (TryOption<A> opt, Func<A, B> Some, Func<B> None) Source #

method B MatchUnsafe <B> (TryOption<A> opt, Func<A, B> Some, B None) Source #

method Func<Unit, S> Fold <S> (TryOption<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (TryOption<A> ma, S state, Func<S, A, S> f) Source #

method S BiFold <S> (TryOption<A> ma, S state, Func<S, A, S> fa, Func<S, Unit, S> fb) Source #

method S BiFoldBack <S> (TryOption<A> ma, S state, Func<S, A, S> fa, Func<S, Unit, S> fb) Source #

method Func<Unit, int> Count (TryOption<A> ma) Source #

method TryOption<A> Some (A value) Source #

method TryOption<A> Optional (A value) Source #

method TryOption<A> Run (Func<Unit, TryOption<A>> ma) Source #

method TryOption<A> BindReturn (Unit _, TryOption<A> mb) Source #

method TryOption<A> Return (A x) Source #

method TryOption<A> Empty () Source #

method TryOption<A> Append (TryOption<A> x, TryOption<A> y) Source #

method TryOption<A> Apply (Func<A, A, A> f, TryOption<A> fa, TryOption<A> fb) Source #

method TryOptionAsync<A> ToAsync (TryOption<A> sa) Source #

struct MTryOptionAsync <A> Source #

Fields

field MTryOptionAsync<A> Inst = default(MTryOptionAsync<A>) Source #

Properties

property TryOptionAsync<A> None Source #

Methods

method MB Bind <MONADB, MB, B> (TryOptionAsync<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (TryOptionAsync<A> ma, Func<A, Task<MB>> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method TryOptionAsync<A> Fail (object err = null) Source #

method TryOptionAsync<A> Plus (TryOptionAsync<A> ma, TryOptionAsync<A> mb) Source #

method TryOptionAsync<A> ReturnAsync (Task<A> x) Source #

Monad return

Parameters

type A

Type of the bound monad value

param x

The bound monad value

returns

Monad of A

method TryOptionAsync<A> ReturnAsync (Func<Unit, Task<A>> f) Source #

Monad return

Parameters

type A

Type of the bound monad value

returns

Monad of A

method TryOptionAsync<A> Zero () Source #

method TryOptionAsync<A> RunAsync (Func<Unit, Task<TryOptionAsync<A>>> ma) Source #

method TryOptionAsync<A> BindReturn (Unit _, TryOptionAsync<A> mb) Source #

method Func<Unit, Task<S>> Fold <S> (TryOptionAsync<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<S>> FoldBack <S> (TryOptionAsync<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldBackAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<int>> Count (TryOptionAsync<A> ma) Source #

method TryOptionAsync<A> Empty () Source #

method TryOptionAsync<A> Append (TryOptionAsync<A> x, TryOptionAsync<A> y) Source #

method Task<S> BiFold <S> (TryOptionAsync<A> ma, S state, Func<S, A, S> Succ, Func<S, Unit, S> Fail) Source #

method Task<S> BiFoldAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, Task<S>> SuccAsync, Func<S, Unit, S> Fail) Source #

method Task<S> BiFoldAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, S> Succ, Func<S, Unit, Task<S>> FailAsync) Source #

method Task<S> BiFoldAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, Task<S>> SuccAsync, Func<S, Unit, Task<S>> FailAsync) Source #

method Task<S> BiFoldBack <S> (TryOptionAsync<A> ma, S state, Func<S, A, S> Succ, Func<S, Unit, S> Fail) Source #

method Task<S> BiFoldBackAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, Task<S>> SuccAsync, Func<S, Unit, S> Fail) Source #

method Task<S> BiFoldBackAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, S> Succ, Func<S, Unit, Task<S>> FailAsync) Source #

method Task<S> BiFoldBackAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, Task<S>> SuccAsync, Func<S, Unit, Task<S>> FailAsync) Source #

method Task<bool> IsSome (TryOptionAsync<A> opt) Source #

method Task<bool> IsNone (TryOptionAsync<A> opt) Source #

method Task<B> Match <B> (TryOptionAsync<A> opt, Func<A, B> Succ, Func<B> Fail) Source #

method Task<B> MatchAsync <B> (TryOptionAsync<A> opt, Func<A, Task<B>> SuccAsync, Func<B> Fail) Source #

method Task<B> MatchAsync <B> (TryOptionAsync<A> opt, Func<A, B> Succ, Func<Task<B>> FailAsync) Source #

method Task<B> MatchAsync <B> (TryOptionAsync<A> opt, Func<A, Task<B>> SuccAsync, Func<Task<B>> FailAsync) Source #

method Task<B> MatchUnsafe <B> (TryOptionAsync<A> opt, Func<A, B> Succ, Func<B> Fail) Source #

method Task<B> MatchUnsafeAsync <B> (TryOptionAsync<A> opt, Func<A, Task<B>> SuccAsync, Func<B> Fail) Source #

method Task<B> MatchUnsafeAsync <B> (TryOptionAsync<A> opt, Func<A, B> Succ, Func<Task<B>> FailAsync) Source #

method Task<B> MatchUnsafeAsync <B> (TryOptionAsync<A> opt, Func<A, Task<B>> SuccAsync, Func<Task<B>> FailAsync) Source #

method Task<Unit> Match (TryOptionAsync<A> opt, Action<A> Succ, Action Fail) Source #

method Task<Unit> MatchAsync (TryOptionAsync<A> opt, Func<A, Task> SuccAsync, Action Fail) Source #

method Task<Unit> MatchAsync (TryOptionAsync<A> opt, Action<A> Succ, Func<Task> FailAsync) Source #

method Task<Unit> MatchAsync (TryOptionAsync<A> opt, Func<A, Task> SuccAsync, Func<Task> FailAsync) Source #

method TryOptionAsync<A> SomeAsync (Task<A> value) Source #

method TryOptionAsync<A> OptionalAsync (Task<A> value) Source #

method TryOptionAsync<A> Some (A value) Source #

method TryOptionAsync<A> Optional (A value) Source #

method TryOptionAsync<A> Apply (Func<A, A, A> f, TryOptionAsync<A> fa, TryOptionAsync<A> fb) Source #

struct MTryOptionFirstAsync <A> Source #

Fields

field MTryOptionFirstAsync<A> Inst = default(MTryOptionFirstAsync<A>) Source #

Properties

property TryOptionAsync<A> None Source #

Methods

method MB Bind <MONADB, MB, B> (TryOptionAsync<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (TryOptionAsync<A> ma, Func<A, Task<MB>> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method TryOptionAsync<A> Fail (object err = null) Source #

method TryOptionAsync<A> Plus (TryOptionAsync<A> ma, TryOptionAsync<A> mb) Source #

method TryOptionAsync<A> ReturnAsync (Task<A> x) Source #

Monad return

Parameters

type A

Type of the bound monad value

param x

The bound monad value

returns

Monad of A

method TryOptionAsync<A> ReturnAsync (Func<Unit, Task<A>> f) Source #

Monad return

Parameters

type A

Type of the bound monad value

returns

Monad of A

method TryOptionAsync<A> Zero () Source #

method TryOptionAsync<A> RunAsync (Func<Unit, Task<TryOptionAsync<A>>> ma) Source #

method TryOptionAsync<A> BindReturn (Unit _, TryOptionAsync<A> mb) Source #

method Func<Unit, Task<S>> Fold <S> (TryOptionAsync<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<S>> FoldBack <S> (TryOptionAsync<A> ma, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldBackAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<int>> Count (TryOptionAsync<A> ma) Source #

method TryOptionAsync<A> Empty () Source #

method TryOptionAsync<A> Append (TryOptionAsync<A> x, TryOptionAsync<A> y) Source #

method Task<S> BiFold <S> (TryOptionAsync<A> ma, S state, Func<S, A, S> Succ, Func<S, Unit, S> Fail) Source #

method Task<S> BiFoldAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, Task<S>> SuccAsync, Func<S, Unit, S> Fail) Source #

method Task<S> BiFoldAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, S> Succ, Func<S, Unit, Task<S>> FailAsync) Source #

method Task<S> BiFoldAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, Task<S>> SuccAsync, Func<S, Unit, Task<S>> FailAsync) Source #

method Task<S> BiFoldBack <S> (TryOptionAsync<A> ma, S state, Func<S, A, S> Succ, Func<S, Unit, S> Fail) Source #

method Task<S> BiFoldBackAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, Task<S>> SuccAsync, Func<S, Unit, S> Fail) Source #

method Task<S> BiFoldBackAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, S> Succ, Func<S, Unit, Task<S>> FailAsync) Source #

method Task<S> BiFoldBackAsync <S> (TryOptionAsync<A> ma, S state, Func<S, A, Task<S>> SuccAsync, Func<S, Unit, Task<S>> FailAsync) Source #

method Task<bool> IsSome (TryOptionAsync<A> opt) Source #

method Task<bool> IsNone (TryOptionAsync<A> opt) Source #

method Task<B> Match <B> (TryOptionAsync<A> opt, Func<A, B> Succ, Func<B> Fail) Source #

method Task<B> MatchAsync <B> (TryOptionAsync<A> opt, Func<A, Task<B>> SuccAsync, Func<B> Fail) Source #

method Task<B> MatchAsync <B> (TryOptionAsync<A> opt, Func<A, B> Succ, Func<Task<B>> FailAsync) Source #

method Task<B> MatchAsync <B> (TryOptionAsync<A> opt, Func<A, Task<B>> SuccAsync, Func<Task<B>> FailAsync) Source #

method Task<B> MatchUnsafe <B> (TryOptionAsync<A> opt, Func<A, B> Succ, Func<B> Fail) Source #

method Task<B> MatchUnsafeAsync <B> (TryOptionAsync<A> opt, Func<A, Task<B>> SuccAsync, Func<B> Fail) Source #

method Task<B> MatchUnsafeAsync <B> (TryOptionAsync<A> opt, Func<A, B> Succ, Func<Task<B>> FailAsync) Source #

method Task<B> MatchUnsafeAsync <B> (TryOptionAsync<A> opt, Func<A, Task<B>> SuccAsync, Func<Task<B>> FailAsync) Source #

method Task<Unit> Match (TryOptionAsync<A> opt, Action<A> Succ, Action Fail) Source #

method Task<Unit> MatchAsync (TryOptionAsync<A> opt, Func<A, Task> SuccAsync, Action Fail) Source #

method Task<Unit> MatchAsync (TryOptionAsync<A> opt, Action<A> Succ, Func<Task> FailAsync) Source #

method Task<Unit> MatchAsync (TryOptionAsync<A> opt, Func<A, Task> SuccAsync, Func<Task> FailAsync) Source #

method TryOptionAsync<A> SomeAsync (Task<A> value) Source #

method TryOptionAsync<A> OptionalAsync (Task<A> value) Source #

method TryOptionAsync<A> Some (A value) Source #

method TryOptionAsync<A> Optional (A value) Source #

method TryOptionAsync<A> Apply (Func<A, A, A> f, TryOptionAsync<A> fa, TryOptionAsync<A> fb) Source #

struct MValidation <MonoidFail, FAIL, SUCCESS> Source #

where MonoidFail : struct, Monoid<FAIL>, Eq<FAIL>

Fields

field MValidation<MonoidFail, FAIL, SUCCESS> Inst = default(MValidation<MonoidFail, FAIL, SUCCESS>) Source #

Methods

method Validation<MonoidFail, FAIL, SUCCESS> Append (Validation<MonoidFail, FAIL, SUCCESS> x, Validation<MonoidFail, FAIL, SUCCESS> y) Source #

method S BiFold <S> (Validation<MonoidFail, FAIL, SUCCESS> foldable, S state, Func<S, FAIL, S> fa, Func<S, SUCCESS, S> fb) Source #

method S BiFoldBack <S> (Validation<MonoidFail, FAIL, SUCCESS> foldable, S state, Func<S, FAIL, S> fa, Func<S, SUCCESS, S> fb) Source #

method Func<Unit, int> Count (Validation<MonoidFail, FAIL, SUCCESS> fa) Source #

method Validation<MonoidFail, FAIL, SUCCESS> Empty () Source #

method Func<Unit, S> Fold <S> (Validation<MonoidFail, FAIL, SUCCESS> fa, S state, Func<S, SUCCESS, S> f) Source #

method Func<Unit, S> FoldBack <S> (Validation<MonoidFail, FAIL, SUCCESS> fa, S state, Func<S, SUCCESS, S> f) Source #

method bool IsBottom (Validation<MonoidFail, FAIL, SUCCESS> choice) Source #

method bool IsLeft (Validation<MonoidFail, FAIL, SUCCESS> choice) Source #

method bool IsRight (Validation<MonoidFail, FAIL, SUCCESS> choice) Source #

method C Match <C> (Validation<MonoidFail, FAIL, SUCCESS> choice, Func<FAIL, C> Left, Func<SUCCESS, C> Right, Func<C> Bottom = null) Source #

method Unit Match (Validation<MonoidFail, FAIL, SUCCESS> choice, Action<FAIL> Left, Action<SUCCESS> Right, Action Bottom = null) Source #

method C MatchUnsafe <C> (Validation<MonoidFail, FAIL, SUCCESS> choice, Func<FAIL, C> Left, Func<SUCCESS, C> Right, Func<C> Bottom = null) Source #

method MB Bind <MONADB, MB, B> (Validation<MonoidFail, FAIL, SUCCESS> ma, Func<SUCCESS, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Validation<MonoidFail, FAIL, SUCCESS> ma, Func<SUCCESS, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Validation<MonoidFail, FAIL, SUCCESS> BindReturn (Unit outputma, Validation<MonoidFail, FAIL, SUCCESS> mb) Source #

method Validation<MonoidFail, FAIL, SUCCESS> Fail (object err = null) Source #

method Validation<MonoidFail, FAIL, SUCCESS> Run (Func<Unit, Validation<MonoidFail, FAIL, SUCCESS>> ma) Source #

method Validation<MonoidFail, FAIL, SUCCESS> Plus (Validation<MonoidFail, FAIL, SUCCESS> a, Validation<MonoidFail, FAIL, SUCCESS> b) Source #

method Validation<MonoidFail, FAIL, SUCCESS> Return (SUCCESS x) Source #

method Validation<MonoidFail, FAIL, SUCCESS> Return (Func<Unit, SUCCESS> f) Source #

method Validation<MonoidFail, FAIL, SUCCESS> Zero () Source #

method Validation<MonoidFail, FAIL, SUCCESS> Apply (Func<SUCCESS, SUCCESS, SUCCESS> f, Validation<MonoidFail, FAIL, SUCCESS> fa, Validation<MonoidFail, FAIL, SUCCESS> fb) Source #

struct MValidation <FAIL, SUCCESS> Source #

Fields

field MValidation<FAIL, SUCCESS> Inst = default(MValidation<FAIL, SUCCESS>) Source #

Methods

method Validation<FAIL, SUCCESS> Append (Validation<FAIL, SUCCESS> x, Validation<FAIL, SUCCESS> y) Source #

method S BiFold <S> (Validation<FAIL, SUCCESS> foldable, S state, Func<S, FAIL, S> fa, Func<S, SUCCESS, S> fb) Source #

method S BiFoldBack <S> (Validation<FAIL, SUCCESS> foldable, S state, Func<S, FAIL, S> fa, Func<S, SUCCESS, S> fb) Source #

method Func<Unit, int> Count (Validation<FAIL, SUCCESS> fa) Source #

method Validation<FAIL, SUCCESS> Empty () Source #

method Func<Unit, S> Fold <S> (Validation<FAIL, SUCCESS> fa, S state, Func<S, SUCCESS, S> f) Source #

method Func<Unit, S> FoldBack <S> (Validation<FAIL, SUCCESS> fa, S state, Func<S, SUCCESS, S> f) Source #

method bool IsBottom (Validation<FAIL, SUCCESS> choice) Source #

method bool IsLeft (Validation<FAIL, SUCCESS> choice) Source #

method bool IsRight (Validation<FAIL, SUCCESS> choice) Source #

method C Match <C> (Validation<FAIL, SUCCESS> choice, Func<Seq<FAIL>, C> Left, Func<SUCCESS, C> Right, Func<C> Bottom = null) Source #

method Unit Match (Validation<FAIL, SUCCESS> choice, Action<Seq<FAIL>> Left, Action<SUCCESS> Right, Action Bottom = null) Source #

method C MatchUnsafe <C> (Validation<FAIL, SUCCESS> choice, Func<Seq<FAIL>, C> Left, Func<SUCCESS, C> Right, Func<C> Bottom = null) Source #

method MB Bind <MONADB, MB, B> (Validation<FAIL, SUCCESS> ma, Func<SUCCESS, MB> f) Source #

where MONADB : struct, Monad<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (Validation<FAIL, SUCCESS> ma, Func<SUCCESS, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method Validation<FAIL, SUCCESS> BindReturn (Unit outputma, Validation<FAIL, SUCCESS> mb) Source #

method Validation<FAIL, SUCCESS> Fail (Seq<FAIL> err) Source #

method Validation<FAIL, SUCCESS> Fail (object err = null) Source #

method Validation<FAIL, SUCCESS> Run (Func<Unit, Validation<FAIL, SUCCESS>> ma) Source #

method Validation<FAIL, SUCCESS> Plus (Validation<FAIL, SUCCESS> a, Validation<FAIL, SUCCESS> b) Source #

method Validation<FAIL, SUCCESS> Return (SUCCESS x) Source #

method Validation<FAIL, SUCCESS> Return (Func<Unit, SUCCESS> f) Source #

method Validation<FAIL, SUCCESS> Zero () Source #

method Validation<FAIL, SUCCESS> Apply (Func<SUCCESS, SUCCESS, SUCCESS> f, Validation<FAIL, SUCCESS> fa, Validation<FAIL, SUCCESS> fb) Source #

struct MValueTask <A> Source #

Class instance to give ValueTask<A> the following traits:

MonadAsync
FoldableAsync
BiFoldableAsync
OptionalAsymc
OptionalUnsafeAsync

Parameters

type A

Bound value type

Fields

Properties

property ValueTask<A> None Source #

Methods

method MB Bind <MONADB, MB, B> (ValueTask<A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method MB BindAsync <MONADB, MB, B> (ValueTask<A> ma, Func<A, Task<MB>> f) Source #

where MONADB : struct, MonadAsync<Unit, Unit, MB, B>

method ValueTask<A> Fail (object err = null) Source #

method ValueTask<A> Plus (ValueTask<A> ma, ValueTask<A> mb) Source #

The Plus function will return ma if successful, mb otherwise

method ValueTask<A> ReturnAsync (Task<A> x) Source #

Monad return

Parameters

type A

Type of the bound monad value

param x

The bound monad value

returns

Monad of A

method ValueTask<A> ReturnAsync (Func<Unit, Task<A>> f) Source #

Monad return

Parameters

type A

Type of the bound monad value

returns

Monad of A

method ValueTask<A> Zero () Source #

method Task<bool> IsNone (ValueTask<A> ma) Source #

method Task<bool> IsSome (ValueTask<A> ma) Source #

method Task<B> Match <B> (ValueTask<A> ma, Func<A, B> Some, Func<B> None) Source #

method ValueTask<A> Some (A value) Source #

method ValueTask<A> Optional (A value) Source #

method ValueTask<A> BindReturn (Unit _, ValueTask<A> mb) Source #

method ValueTask<A> RunAsync (Func<Unit, Task<ValueTask<A>>> ma) Source #

method Func<Unit, Task<S>> Fold <S> (ValueTask<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldAsync <S> (ValueTask<A> fa, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<S>> FoldBack <S> (ValueTask<A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, Task<S>> FoldBackAsync <S> (ValueTask<A> fa, S state, Func<S, A, Task<S>> f) Source #

method Func<Unit, Task<int>> Count (ValueTask<A> fa) Source #

method ValueTask<A> Apply (Func<A, A, A> f, ValueTask<A> fa, ValueTask<A> fb) Source #

method Task<B> MatchAsync <B> (ValueTask<A> ma, Func<A, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchAsync <B> (ValueTask<A> ma, Func<A, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchAsync <B> (ValueTask<A> ma, Func<A, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

method Task<Unit> Match (ValueTask<A> ma, Action<A> Some, Action None) Source #

method Task<Unit> MatchAsync (ValueTask<A> ma, Func<A, Task> SomeAsync, Action None) Source #

method Task<Unit> MatchAsync (ValueTask<A> ma, Action<A> Some, Func<Task> None) Source #

method Task<Unit> MatchAsync (ValueTask<A> ma, Func<A, Task> SomeAsync, Func<Task> NoneAsync) Source #

method ValueTask<A> SomeAsync (Task<A> value) Source #

method ValueTask<A> OptionalAsync (Task<A> value) Source #

method Task<S> BiFold <S> (ValueTask<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, S> None) Source #

method Task<S> BiFoldAsync <S> (ValueTask<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, S> None) Source #

method Task<S> BiFoldAsync <S> (ValueTask<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldAsync <S> (ValueTask<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldBack <S> (ValueTask<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, S> None) Source #

method Task<S> BiFoldBackAsync <S> (ValueTask<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, S> None) Source #

method Task<S> BiFoldBackAsync <S> (ValueTask<A> ma, S state, Func<S, A, S> Some, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<S> BiFoldBackAsync <S> (ValueTask<A> ma, S state, Func<S, A, Task<S>> SomeAsync, Func<S, Unit, Task<S>> NoneAsync) Source #

method Task<B> MatchUnsafe <B> (ValueTask<A> ma, Func<A, B> Some, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (ValueTask<A> ma, Func<A, Task<B>> SomeAsync, Func<B> None) Source #

method Task<B> MatchUnsafeAsync <B> (ValueTask<A> ma, Func<A, B> Some, Func<Task<B>> NoneAsync) Source #

method Task<B> MatchUnsafeAsync <B> (ValueTask<A> ma, Func<A, Task<B>> SomeAsync, Func<Task<B>> NoneAsync) Source #

struct MWriter <MonoidW, W, A> Source #

where MonoidW : struct, Monoid<W>

Methods

method MB Bind <MONADB, MB, B> (Writer<MonoidW, W, A> ma, Func<A, MB> f) Source #

where MONADB : struct, Monad<Unit, (W, bool), MB, B>

method MB BindAsync <MONADB, MB, B> (Writer<MonoidW, W, A> ma, Func<A, MB> f) Source #

where MONADB : struct, MonadAsync<Unit, (W, bool), MB, B>

method Writer<MonoidW, W, A> BindReturn ((W, bool) output, Writer<MonoidW, W, A> mb) Source #

method Writer<MonoidW, W, A> Fail (object err = null) Source #

method Writer<MonoidW, W, A> Writer (A value, W output) Source #

method Writer<MonoidW, W, A> Run (Func<Unit, Writer<MonoidW, W, A>> f) Source #

method Writer<MonoidW, W, A> Return (Func<Unit, A> f) Source #

method Writer<MonoidW, W, Unit> Tell (W what) Source #

Tells the monad what you want it to hear. The monad carries this 'packet' upwards, merging it if needed (hence the Monoid requirement).

Parameters

type W

Type of the value tell

param what

The value to tell

returns

Updated writer monad

method Writer<MonoidW, W, (A, B)> Listen <B> (Writer<MonoidW, W, A> ma, Func<W, B> f) Source #

'listen' is an action that executes the monad and adds its output to the value of the computation.

method Writer<MonoidW, W, A> Plus (Writer<MonoidW, W, A> ma, Writer<MonoidW, W, A> mb) Source #

method Writer<MonoidW, W, A> Zero () Source #

method Func<Unit, S> Fold <S> (Writer<MonoidW, W, A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, S> FoldBack <S> (Writer<MonoidW, W, A> fa, S state, Func<S, A, S> f) Source #

method Func<Unit, int> Count (Writer<MonoidW, W, A> fa) Source #

method Writer<MonoidW, W, A> Apply (Func<A, A, A> f, Writer<MonoidW, W, A> fa, Writer<MonoidW, W, A> fb) Source #