public static Task <S> bifold <S, A>(OptionAsync <A> ma, S state, Func <S, A, Task <S> > Some, Func <S, Unit, Task <S> > None) => ma.BiFoldAsync(state, Some, None);
public static Task <bool> isNone <T>(OptionAsync <T> value) => value.IsNone;
public static TryOptionAsync <OptionAsync <A> > Sequence <A>(this OptionAsync <TryOptionAsync <A> > ta) => ta.Traverse(identity);
public static OptionAsync <T> product <NUM, T>(OptionAsync <T> lhs, OptionAsync <T> rhs) where NUM : struct, Num <T> => lhs.Product <NUM, T>(rhs);
public static OptionAsync <T> add <NUM, T>(OptionAsync <T> lhs, OptionAsync <T> rhs) where NUM : struct, Num <T> => lhs.Add <NUM, T>(rhs);
public static Task <OptionAsync <B> > Sequence <A, B>(this OptionAsync <A> ta, Func <A, Task <B> > f) => ta.Map(f).Sequence();
public static OptionAsync <A> flatten <A>(OptionAsync <OptionAsync <A> > ma) => ma.Bind(identity);
public static OptionAsync <B> map <A, B>(OptionAsync <A> ma, Func <A, B> f) => ma.Map(f);
public static OptionAsync <B> bimap <A, B>(OptionAsync <A> ma, Func <A, B> Some, Func <Unit, B> None) => ma.BiMap(Some, None);
public static Task <bool> exists <A>(OptionAsync <A> ma, Func <A, bool> pred) => ma.Exists(pred);
public static Task <bool> biexists <A>(OptionAsync <A> ma, Func <A, bool> Some, Func <bool> None) => ma.BiExists(Some, None);
public static Task <int> count <A>(OptionAsync <A> ma) => ma.Count();
public static Task <bool> biforall <A>(OptionAsync <A> ma, Func <A, bool> Some, Func <bool> None) => ma.BiForAll(Some, None);
public static Task <bool> forall <A>(OptionAsync <A> ma, Func <A, bool> pred) => ma.ForAll(pred);
public static Aff <OptionAsync <A> > Sequence <A>(this OptionAsync <Aff <A> > mma) => mma.Traverse(identity);
public static OptionAsync <Func <T2, Func <T3, R> > > parmap <T1, T2, T3, R>(OptionAsync <T1> ma, Func <T1, T2, T3, R> mapper) => ma.ParMap(mapper);
public void SetResult(A result) => Task = OptionAsync <A> .Some(result);
public static OptionAsync <T> filter <T>(OptionAsync <T> ma, Func <T, bool> pred) => ma.Filter(pred);
public static OptionAsync <Task <A> > SomeValueAsync <A>(Task <A> taskValue) => OptionAsync <Task <A> > .SomeAsync(taskValue.AsTask());
public static OptionAsync <R> bind <T, R>(OptionAsync <T> ma, Func <T, OptionAsync <R> > binder) => ma.Bind(binder);
public static OptionAsync <T> subtract <NUM, T>(OptionAsync <T> lhs, OptionAsync <T> rhs) where NUM : struct, Num <T> => lhs.Subtract <NUM, T>(rhs);
public static Task <Lst <T> > toList <T>(OptionAsync <T> OptionAsync) => OptionAsync.ToList();
public static OptionAsync <T> divide <NUM, T>(OptionAsync <T> lhs, OptionAsync <T> rhs) where NUM : struct, Num <T> => lhs.Divide <NUM, T>(rhs);
public static Task <Arr <T> > toArray <T>(OptionAsync <T> OptionAsync) => OptionAsync.ToArray();
public static Task <bool> isSome <T>(OptionAsync <T> value) => value.IsSome;
public static Aff <RT, OptionAsync <B> > Sequence <RT, A, B>(this OptionAsync <A> ta, Func <A, Aff <RT, B> > f) where RT : struct, HasCancel <RT> => ta.Map(f).Sequence();
public static OptionAsync <T> SomeAsync <T>(Task <T> taskValue) => OptionAsync <T> .SomeAsync(taskValue);
public static Task <bool> equalsAsync <EqA, A>(OptionAsync <A> x, OptionAsync <A> y) where EqA : struct, EqAsync <A> => default(EqOptionAsync <EqA, A>).EqualsAsync(x, y);
/// <summary> /// Run the `alternative` when the `flag` is `true`, return `Pure Unit` when `false` /// </summary> /// <param name="flag">If `true` the `alternative` is run</param> /// <param name="alternative">Computation to run if the `flag` is `true`</param> /// <returns>Either the result of the `alternative` computation if the `flag` is `true` or `Unit`</returns> /// <example> /// /// from x in ma /// from _ in when(x == 100, None) /// select x; /// /// </example> public static OptionAsync <Unit> when(bool flag, OptionAsync <Unit> alternative) => flag ? alternative : SomeAsync(unit);
public static Task <S> bifold <S, A>(OptionAsync <A> ma, S state, Func <S, A, S> Some, Func <S, S> None) => ma.BiFold(state, Some, None);