- ChoiceAsync <CH, L, R>
- TypeClass
- matchUntypedAsync <CHOICE, CH, A, B, R> (CH ma, Func<object, R> Left, Func<object, R> Right, Func<R> Bottom = null)
- toArrayAsync <CHOICE, CH, A, B> (CH ma)
- toListAsync <CHOICE, CH, A, B> (CH ma)
- toSeqAsync <CHOICE, CH, A, B> (CH ma)
- toEitherAsync <CHOICE, CH, A, B> (CH ma)
- toOptionAsync <CHOICE, CH, A, B> (CH ma)
- matchAsync <CHOICE, CH, A, B, R> (CH ma, Func<A, Task<R>> LeftAsync, Func<B, R> Right)
- matchAsync <CHOICE, CH, A, B, R> (CH ma, Func<A, R> Left, Func<B, Task<R>> RightAsync)
- matchAsync <CHOICE, CH, A, B, R> (CH ma, Func<A, Task<R>> LeftAsync, Func<B, Task<R>> RightAsync)
- ifLeftAsync <CHOICE, CH, A, B> (CH ma, Func<B> Left)
- ifLeftAsync <CHOICE, CH, A, B> (CH ma, Func<A, B> Left)
- ifLeftAsync <CHOICE, CH, A, B> (CH ma, B Right)
- ifLeftAsync <CHOICE, CH, A, B> (CH ma, Action<A> Left)
- ifRightAsync <CHOICE, CH, A, B> (CH ma, Action<B> Right)
- ifRightAsync <CHOICE, CH, A, B> (CH ma, A Left)
- ifRightAsync <CHOICE, CH, A, B> (CH ma, Func<A> Right)
- ifRightAsync <CHOICE, CH, A, B> (CH ma, Func<B, A> Right)
- rightToListAsync <CHOICE, CH, A, B> (CH ma)
- rightToArrayAsync <CHOICE, CH, A, B> (CH ma)
- leftToListAsync <CHOICE, CH, A, B> (CH ma)
- leftToArrayAsync <CHOICE, CH, A, B> (CH ma)
- rightAsEnumerableAsync <CHOICE, CH, A, B> (CH ma)
- leftAsEnumerableAsync <CHOICE, CH, A, B> (CH ma)
- hashCodeAsync <CHOICE, CH, A, B> (CH ma)
- leftsAsync <CHOICE, CH, A, B> (IEnumerable<CH> ma)
- leftsAsync <CHOICE, CH, A, B> (Seq<CH> ma)
- rightsAsync <CHOICE, CH, A, B> (IEnumerable<CH> ma)
- rightsAsync <CHOICE, CH, A, B> (Seq<CH> ma)
- partitionAsync <CHOICE, CH, A, B> (IEnumerable<CH> ma)
- partitionAsync <CHOICE, CH, A, B> (Seq<CH> ma)
interface ChoiceAsync <CH, L, R> Source #
method Task<R> matchUntypedAsync <CHOICE, CH, A, B, R> (CH ma, Func<object, R> Left, Func<object, R> Right, Func<R> Bottom = null) Source #
Match operation with an untyped value for Some. This can be useful for serialisation and dealing with the IOptional interface
type | R | The return type |
param | Some | Operation to perform if the option is in a Some state |
param | None | Operation to perform if the option is in a None state |
returns | The result of the match operation |
method Task<Arr<B>> toArrayAsync <CHOICE, CH, A, B> (CH ma) Source #
Convert the Option to an enumerable of zero or one items
param | ma | Option |
returns | An enumerable of zero or one items |
method Task<Lst<B>> toListAsync <CHOICE, CH, A, B> (CH ma) Source #
Convert the Option to an immutable list of zero or one items
param | ma | Option |
returns | An immutable list of zero or one items |
method Task<IEnumerable<B>> toSeqAsync <CHOICE, CH, A, B> (CH ma) Source #
Convert the Option to an enumerable sequence of zero or one items
type | A | Bound value type |
param | ma | Option |
returns | An enumerable sequence of zero or one items |
method EitherAsync<A, B> toEitherAsync <CHOICE, CH, A, B> (CH ma) Source #
Convert the structure to an Either
method OptionAsync<B> toOptionAsync <CHOICE, CH, A, B> (CH ma) Source #
Convert the structure to a Option
method Task<R> matchAsync <CHOICE, CH, A, B, R> (CH ma, Func<A, Task<R>> LeftAsync, Func<B, R> Right) Source #
method Task<R> matchAsync <CHOICE, CH, A, B, R> (CH ma, Func<A, R> Left, Func<B, Task<R>> RightAsync) Source #
method Task<R> matchAsync <CHOICE, CH, A, B, R> (CH ma, Func<A, Task<R>> LeftAsync, Func<B, Task<R>> RightAsync) Source #
method Task<B> ifLeftAsync <CHOICE, CH, A, B> (CH ma, Func<B> Left) Source #
method Task<B> ifLeftAsync <CHOICE, CH, A, B> (CH ma, Func<A, B> Left) Source #
method Task<B> ifLeftAsync <CHOICE, CH, A, B> (CH ma, B Right) Source #
method Task<Unit> ifLeftAsync <CHOICE, CH, A, B> (CH ma, Action<A> Left) Source #
method Task<Unit> ifRightAsync <CHOICE, CH, A, B> (CH ma, Action<B> Right) Source #
method Task<A> ifRightAsync <CHOICE, CH, A, B> (CH ma, A Left) Source #
Returns the leftValue if the Either is in a Right state. Returns the Left value if the Either is in a Left state.
param | Left | Value to return if in the Left state |
returns | Returns an unwrapped Left value |
method Task<A> ifRightAsync <CHOICE, CH, A, B> (CH ma, Func<A> Right) Source #
Returns the result of Right() if the Either is in a Right state. Returns the Left value if the Either is in a Left state.
param | Right | Function to generate a Left value if in the Right state |
returns | Returns an unwrapped Left value |
method Task<A> ifRightAsync <CHOICE, CH, A, B> (CH ma, Func<B, A> Right) Source #
Returns the result of rightMap if the Either is in a Right state. Returns the Left value if the Either is in a Left state.
param | Right | Function to generate a Left value if in the Right state |
returns | Returns an unwrapped Left value |
method Task<Lst<B>> rightToListAsync <CHOICE, CH, A, B> (CH ma) Source #
Project the Either into a Lst R
returns | If the Either is in a Right state, a Lst of R with one item. A zero length Lst R otherwise |
method Task<Arr<B>> rightToArrayAsync <CHOICE, CH, A, B> (CH ma) Source #
Project the Either into an Arr R
returns | If the Either is in a Right state, a ImmutableArray of R with one item. A zero length ImmutableArray of R otherwise |
method Task<Lst<A>> leftToListAsync <CHOICE, CH, A, B> (CH ma) Source #
Project the Either into a Lst R
returns | If the Either is in a Right state, a Lst of R with one item. A zero length Lst R otherwise |
method Task<Arr<A>> leftToArrayAsync <CHOICE, CH, A, B> (CH ma) Source #
Project the Either into an ImmutableArray R
returns | If the Either is in a Right state, a ImmutableArray of R with one item. A zero length ImmutableArray of R otherwise |
method Task<Seq<B>> rightAsEnumerableAsync <CHOICE, CH, A, B> (CH ma) Source #
Project the Either into a IEnumerable R
returns | If the Either is in a Right state, a IEnumerable of R with one item. A zero length IEnumerable R otherwise |
method Task<Seq<A>> leftAsEnumerableAsync <CHOICE, CH, A, B> (CH ma) Source #
Project the Either into a IEnumerable L
returns | If the Either is in a Left state, a IEnumerable of L with one item. A zero length IEnumerable L otherwise |
method Task<int> hashCodeAsync <CHOICE, CH, A, B> (CH ma) Source #
method Task<IEnumerable<A>> leftsAsync <CHOICE, CH, A, B> (IEnumerable<CH> ma) Source #
Extracts from a list of 'Either' all the 'Left' elements. All the 'Left' elements are extracted in order.
type | L | Left |
type | R | Right |
param | ma | Either list |
returns | An enumerable of L |
method Task<Seq<A>> leftsAsync <CHOICE, CH, A, B> (Seq<CH> ma) Source #
Extracts from a list of 'Either' all the 'Left' elements. All the 'Left' elements are extracted in order.
type | L | Left |
type | R | Right |
param | ma | Either list |
returns | An enumerable of L |
method Task<IEnumerable<B>> rightsAsync <CHOICE, CH, A, B> (IEnumerable<CH> ma) Source #
Extracts from a list of 'Either' all the 'Right' elements. All the 'Right' elements are extracted in order.
type | L | Left |
type | R | Right |
param | ma | Choice list |
returns | An enumerable of L |
method Task<Seq<B>> rightsAsync <CHOICE, CH, A, B> (Seq<CH> ma) Source #
Extracts from a list of 'Either' all the 'Right' elements. All the 'Right' elements are extracted in order.
type | L | Left |
type | R | Right |
param | ma | Choice list |
returns | An enumerable of L |
method Task<(IEnumerable<A> Lefts, IEnumerable<B> Rights)> partitionAsync <CHOICE, CH, A, B> (IEnumerable<CH> ma) Source #
Partitions a list of 'Either' into two lists. All the 'Left' elements are extracted, in order, to the first component of the output. Similarly the 'Right' elements are extracted to the second component of the output.
type | L | Left |
type | R | Right |
param | ma | Choice list |
returns | A tuple containing the an enumerable of L and an enumerable of R |
method Task<(Seq<A> Lefts, Seq<B> Rights)> partitionAsync <CHOICE, CH, A, B> (Seq<CH> ma) Source #
Partitions a list of 'Either' into two lists. All the 'Left' elements are extracted, in order, to the first component of the output. Similarly the 'Right' elements are extracted to the second component of the output.
type | L | Left |
type | R | Right |
param | ma | Choice list |
returns | A tuple containing the an enumerable of L and an enumerable of R |