- Choice <CH, L, R>
- Choice
- matchUntyped <CHOICE, CH, A, B, R> (CH ma, Func<object, R> Left, Func<object, R> Right, Func<R> Bottom = null)
- toArray <CHOICE, CH, A, B> (CH ma)
- toList <CHOICE, CH, A, B> (CH ma)
- toSeq <CHOICE, CH, A, B> (CH ma)
- toEither <CHOICE, CH, A, B> (CH ma)
- toEitherUnsafe <CHOICE, CH, A, B> (CH ma)
- toOption <CHOICE, CH, A, B> (CH ma)
- toOptionUnsafe <CHOICE, CH, A, B> (CH ma)
- toTryOption <CHOICE, CH, A, B> (CH ma)
- ifLeft <CHOICE, CH, A, B> (CH ma, Func<B> Left)
- ifLeft <CHOICE, CH, A, B> (CH ma, Func<A, B> leftMap)
- ifLeft <CHOICE, CH, A, B> (CH ma, B rightValue)
- ifLeft <CHOICE, CH, A, B> (CH ma, Action<A> Left)
- ifRight <CHOICE, CH, A, B> (CH ma, Action<B> Right)
- ifRight <CHOICE, CH, A, B> (CH ma, A leftValue)
- ifRight <CHOICE, CH, A, B> (CH ma, Func<A> Right)
- ifRight <CHOICE, CH, A, B> (CH ma, Func<B, A> rightMap)
- rightToList <CHOICE, CH, A, B> (CH ma)
- rightToArray <CHOICE, CH, A, B> (CH ma)
- leftToList <CHOICE, CH, A, B> (CH ma)
- leftToArray <CHOICE, CH, A, B> (CH ma)
- rightAsEnumerable <CHOICE, CH, A, B> (CH ma)
- leftAsEnumerable <CHOICE, CH, A, B> (CH ma)
- hashCode <CHOICE, CH, A, B> (CH ma)
- lefts <CHOICE, CH, A, B> (IEnumerable<CH> ma)
- lefts <CHOICE, CH, A, B> (Seq<CH> ma)
- rights <CHOICE, CH, A, B> (IEnumerable<CH> ma)
- rights <CHOICE, CH, A, B> (Seq<CH> ma)
- partition <CHOICE, CH, A, B> (IEnumerable<CH> ma)
- partition <CHOICE, CH, A, B> (Seq<CH> ma)
method R matchUntyped <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 Arr<B> toArray <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 Lst<B> toList <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 IEnumerable<B> toSeq <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 Either<A, B> toEither <CHOICE, CH, A, B> (CH ma) Source #
Convert the structure to an Either
method EitherUnsafe<A, B> toEitherUnsafe <CHOICE, CH, A, B> (CH ma) Source #
Convert the structure to an EitherUnsafe
method Option<B> toOption <CHOICE, CH, A, B> (CH ma) Source #
Convert the structure to a Option
method OptionUnsafe<B> toOptionUnsafe <CHOICE, CH, A, B> (CH ma) Source #
Convert the structure to a OptionUnsafe
method TryOption<B> toTryOption <CHOICE, CH, A, B> (CH ma) Source #
Convert the structure to a TryOption
method B ifLeft <CHOICE, CH, A, B> (CH ma, Func<B> Left) Source #
method B ifLeft <CHOICE, CH, A, B> (CH ma, Func<A, B> leftMap) Source #
method B ifLeft <CHOICE, CH, A, B> (CH ma, B rightValue) Source #
method Unit ifLeft <CHOICE, CH, A, B> (CH ma, Action<A> Left) Source #
method Unit ifRight <CHOICE, CH, A, B> (CH ma, Action<B> Right) Source #
method A ifRight <CHOICE, CH, A, B> (CH ma, A leftValue) 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 | leftValue | Value to return if in the Left state |
returns | Returns an unwrapped Left value |
method A ifRight <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 A ifRight <CHOICE, CH, A, B> (CH ma, Func<B, A> rightMap) 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 | rightMap | Function to generate a Left value if in the Right state |
returns | Returns an unwrapped Left value |
method Lst<B> rightToList <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 Arr<B> rightToArray <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 Lst<A> leftToList <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 Arr<A> leftToArray <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 Seq<B> rightAsEnumerable <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 Seq<A> leftAsEnumerable <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 IEnumerable<A> lefts <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 Seq<A> lefts <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 IEnumerable<B> rights <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 Seq<B> rights <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 (IEnumerable<A> Lefts, IEnumerable<B> Rights) partition <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 (Seq<A> Lefts, Seq<B> Rights) partition <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 |