- TaskExtensions
- CompletedSuccessfully <A> (this Task<A> ma)
- Case <A> (this Task<A> ma)
- AsFailedTask <A> (this Exception ex)
- AsTask <A> (this A self)
- ToRef <A> (this ValueTask<A> self)
- Flatten <A> (this Task<Task<A>> self)
- Flatten <A> (this Task<Task<Task<A>>> self)
- Select <T, U> (this Task<T> self, Func<T, U> map)
- Where <T> (this Task<T> self, Func<T, bool> pred)
- SelectMany <T, U> (this Task<T> self, Func<T, Task<U>> bind)
- SelectMany <T, U, V> (this Task<T> self, Func<T, Task<U>> bind, Func<T, U, V> project)
- Count <T> (this Task<T> self)
- Bind <T, U> (this Task<T> self, Func<T, Task<U>> bind)
- Exists <T> (this Task<T> self, Func<T, bool> pred)
- ExistsAsync <T> (this Task<T> self, Func<T, Task<bool>> pred)
- ForAll <T> (this Task<T> self, Func<T, bool> pred)
- ForAllAsync <T> (this Task<T> self, Func<T, Task<bool>> pred)
- Filter <T> (this Task<T> self, Func<T, bool> pred)
- Fold <T, S> (this Task<T> self, S state, Func<S, T, S> folder)
- FoldAsync <T, S> (this Task<T> self, S state, Func<S, T, Task<S>> folder)
- Iter <T> (this Task<T> self, Action<T> f)
- Do <A> (this Task<A> ma, Action<A> f)
- Map <T, U> (this Task<T> self, Func<T, U> map)
- MapAsync <T, U> (this Task<T> self, Func<T, Task<U>> map)
- Join <T, U, K, V> (this Task<T> source, Task<U> inner, Func<T, K> outerKeyMap, Func<U, K> innerKeyMap, Func<T, U, V> project)
- GroupJoin <T, U, K, V> (this Task<T> source, Task<U> inner, Func<T, K> outerKeyMap, Func<U, K> innerKeyMap, Func<T, Task<U>, V> project)
- Plus <A> (this Task<A> ma, Task<A> mb)
- PlusFirst <A> (this Task<A> ma, Task<A> mb)
- Cast <A> (this Task source)
- ToUnit (this Task source)
- ToAff <A> (this Task<A> ma)
- Prelude
- TaskSucc <A> (A self)
- TaskFail <A> (Exception ex)
- flatten <A> (Task<Task<A>> self)
- flatten <A> (Task<Task<Task<A>>> self)
- count <A> (Task<A> self)
- bind <A, B> (Task<A> self, Func<A, Task<B>> bind)
- exists <A> (Task<A> self, Func<A, bool> pred)
- existsAsync <A> (Task<A> self, Func<A, Task<bool>> pred)
- forall <A> (Task<A> self, Func<A, bool> pred)
- forallAsync <A> (Task<A> self, Func<A, Task<bool>> pred)
- filter <A> (Task<A> self, Func<A, bool> pred)
- fold <S, A> (Task<A> self, S state, Func<S, A, S> folder)
- foldAsync <S, A> (Task<A> self, S state, Func<S, A, Task<S>> folder)
- iter <A> (Task<A> self, Action<A> f)
- map <A, B> (Task<A> self, Func<A, B> map)
- mapAsync <A, B> (Task<A> self, Func<A, Task<B>> map)
- plus <A> (this Task<A> ma, Task<A> mb)
- plusFirst <A> (this Task<A> ma, Task<A> mb)
- choice <A> (Task<A> ma, params Task<A>[] tail)
- choice <A> (Seq<Task<A>> xs)
- apply <A, B> (Task<Func<A, B>> fab, Task<A> fa)
- apply <A, B> (Func<A, B> fab, Task<A> fa)
- apply <A, B, C> (Task<Func<A, B, C>> fabc, Task<A> fa, Task<B> fb)
- apply <A, B, C> (Func<A, B, C> fabc, Task<A> fa, Task<B> fb)
- apply <A, B, C> (Task<Func<A, B, C>> fabc, Task<A> fa)
- apply <A, B, C> (Func<A, B, C> fabc, Task<A> fa)
- apply <A, B, C> (Task<Func<A, Func<B, C>>> fabc, Task<A> fa)
- apply <A, B, C> (Func<A, Func<B, C>> fabc, Task<A> fa)
class TaskExtensions Source #
method bool CompletedSuccessfully <A> (this Task<A> ma) Source #
method Task<object> Case <A> (this Task<A> ma) Source #
Use for pattern-matching the case of the target
Task succeeds = result is A
Task fails = result is LanguageExt.Common.Error
method Task<A> AsFailedTask <A> (this Exception ex) Source #
method Task<A> AsTask <A> (this A self) Source #
Convert a value to a Task that completes immediately
method Task<U> Select <T, U> (this Task<T> self, Func<T, U> map) Source #
Standard LINQ Select implementation for Task
method Task<T> Where <T> (this Task<T> self, Func<T, bool> pred) Source #
Standard LINQ Where implementation for Task
method Task<U> SelectMany <T, U> (this Task<T> self, Func<T, Task<U>> bind) Source #
Standard LINQ SelectMany implementation for Task
method Task<V> SelectMany <T, U, V> (this Task<T> self, Func<T, Task<U>> bind, Func<T, U, V> project) Source #
Standard LINQ SelectMany implementation for Task
method Task<int> Count <T> (this Task<T> self) Source #
Get the Count of a Task T. Returns either 1 or 0 if cancelled or faulted.
method Task<U> Bind <T, U> (this Task<T> self, Func<T, Task<U>> bind) Source #
Monadic bind operation for Task
method Task<bool> Exists <T> (this Task<T> self, Func<T, bool> pred) Source #
Returns false if the Task is cancelled or faulted, otherwise it returns the result of pred(Result)
method Task<bool> ExistsAsync <T> (this Task<T> self, Func<T, Task<bool>> pred) Source #
Returns false if the Task is cancelled or faulted, otherwise it returns the result of pred(Result)
method Task<bool> ForAll <T> (this Task<T> self, Func<T, bool> pred) Source #
Returns false if the Task is cancelled or faulted, otherwise it returns the result of pred(Result)
method Task<bool> ForAllAsync <T> (this Task<T> self, Func<T, Task<bool>> pred) Source #
Returns false if the Task is cancelled or faulted, otherwise it returns the result of pred(Result)
method Task<T> Filter <T> (this Task<T> self, Func<T, bool> pred) Source #
Filters the task. This throws a BottomException when pred(Result) returns false
method Task<S> Fold <T, S> (this Task<T> self, S state, Func<S, T, S> folder) Source #
Folds the Task. Returns folder(state,Result) if not faulted or cancelled. Returns state otherwise.
method Task<S> FoldAsync <T, S> (this Task<T> self, S state, Func<S, T, Task<S>> folder) Source #
Folds the Task. Returns folder(state,Result) if not faulted or cancelled. Returns state otherwise.
method Task<Unit> Iter <T> (this Task<T> self, Action<T> f) Source #
Iterates the Task. Invokes f(Result) if not faulted or cancelled
method Task<A> Do <A> (this Task<A> ma, Action<A> f) Source #
Impure iteration of the bound value in the structure
returns | Returns the original unmodified structure |
method Task<U> Map <T, U> (this Task<T> self, Func<T, U> map) Source #
Returns map(Result) if not faulted or cancelled.
method Task<U> MapAsync <T, U> (this Task<T> self, Func<T, Task<U>> map) Source #
Returns map(Result) if not faulted or cancelled.
method Task<V> Join <T, U, K, V> (this Task<T> source, Task<U> inner, Func<T, K> outerKeyMap, Func<U, K> innerKeyMap, Func<T, U, V> project) Source #
method Task<A> TaskFail <A> (Exception ex) Source #
Convert a value to a Task that completes immediately
method Task<int> count <A> (Task<A> self) Source #
Get the Count of a Task T. Returns either 1 or 0 if cancelled or faulted.
method Task<B> bind <A, B> (Task<A> self, Func<A, Task<B>> bind) Source #
Monadic bind operation for Task
method Task<bool> exists <A> (Task<A> self, Func<A, bool> pred) Source #
Returns false if the Task is cancelled or faulted, otherwise it returns the result of pred(Result)
method Task<bool> existsAsync <A> (Task<A> self, Func<A, Task<bool>> pred) Source #
Returns false if the Task is cancelled or faulted, otherwise it returns the result of pred(Result)
method Task<bool> forall <A> (Task<A> self, Func<A, bool> pred) Source #
Returns false if the Task is cancelled or faulted, otherwise it returns the result of pred(Result)
method Task<bool> forallAsync <A> (Task<A> self, Func<A, Task<bool>> pred) Source #
Returns false if the Task is cancelled or faulted, otherwise it returns the result of pred(Result)
method Task<A> filter <A> (Task<A> self, Func<A, bool> pred) Source #
Filters the task. This throws a BottomException when pred(Result) returns false
method Task<S> fold <S, A> (Task<A> self, S state, Func<S, A, S> folder) Source #
Folds the Task. Returns folder(state,Result) if not faulted or cancelled. Returns state otherwise.
method Task<S> foldAsync <S, A> (Task<A> self, S state, Func<S, A, Task<S>> folder) Source #
Folds the Task. Returns folder(state,Result) if not faulted or cancelled. Returns state otherwise.
method Task<Unit> iter <A> (Task<A> self, Action<A> f) Source #
Iterates the Task. Invokes f(Result) if not faulted or cancelled
method Task<B> map <A, B> (Task<A> self, Func<A, B> map) Source #
Returns map(Result) if not faulted or cancelled.
method Task<B> mapAsync <A, B> (Task<A> self, Func<A, Task<B>> map) Source #
Returns map(Result) if not faulted or cancelled.
method Task<A> choice <A> (Task<A> ma, params Task<A>[] tail) Source #
Returns the first successful computation
type | A | Bound value |
param | ma | The first computation to run |
param | tail | The rest of the computations to run |
returns | The first computation that succeeds |
method Task<A> choice <A> (Seq<Task<A>> xs) Source #
Returns the first successful computation
type | A | Bound value |
param | xs | Sequence of computations to run |
returns | The first computation that succeeds |
method Task<B> apply <A, B> (Task<Func<A, B>> fab, Task<A> fa) Source #
Apply
param | fab | Function to apply the applicative to |
param | fa | Applicative to apply |
returns | Applicative of type FB derived from Applicative of B |
method Task<B> apply <A, B> (Func<A, B> fab, Task<A> fa) Source #
Apply
param | fab | Function to apply the applicative to |
param | fa | Applicative to apply |
returns | Applicative of type FB derived from Applicative of B |
method Task<C> apply <A, B, C> (Task<Func<A, B, C>> fabc, Task<A> fa, Task<B> fb) Source #
Apply
param | fab | Function to apply the applicative to |
param | fa | Applicative a to apply |
param | fb | Applicative b to apply |
returns | Applicative of type FC derived from Applicative of C |
method Task<C> apply <A, B, C> (Func<A, B, C> fabc, Task<A> fa, Task<B> fb) Source #
Apply
param | fab | Function to apply the applicative to |
param | fa | Applicative a to apply |
param | fb | Applicative b to apply |
returns | Applicative of type FC derived from Applicative of C |
method Task<Func<B, C>> apply <A, B, C> (Task<Func<A, B, C>> fabc, Task<A> fa) Source #
Apply
param | fab | Function to apply the applicative to |
param | fa | Applicative to apply |
returns | Applicative of type f(b -> c) derived from Applicative of Func<B, C> |
method Task<Func<B, C>> apply <A, B, C> (Func<A, B, C> fabc, Task<A> fa) Source #
Apply
param | fab | Function to apply the applicative to |
param | fa | Applicative to apply |
returns | Applicative of type f(b -> c) derived from Applicative of Func<B, C> |