- TaskTryOptionExtensions
- ToAsync <A> (this Task<TryOption<A>> self)
- ToAsync <A> (this TryOption<Task<A>> self)
- IfSome <A> (this Task<TryOption<A>> self, Action<A> Some)
- IfNoneOrFail <A> (this Task<TryOption<A>> self, Action None)
- IfNoneOrFail <A> (this Task<TryOption<A>> self, A defaultValue)
- IfNoneOrFail <A> (this Task<TryOption<A>> self, Func<A> None)
- IfNoneOrFail <A> (this Task<TryOption<A>> self, Func<Task<A>> None)
- IfNoneOrFail <A> ( this Task<TryOption<A>> self, Func<A> None, Func<Exception, A> Fail)
- IfNoneOrFail <A> ( this Task<TryOption<A>> self, Func<Task<A>> None, Func<Exception, A> Fail)
- IfNoneOrFail <A> ( this Task<TryOption<A>> self, Func<A> None, Func<Exception, Task<A>> Fail)
- IfNoneOrFail <A> ( this Task<TryOption<A>> self, Func<Task<A>> None, Func<Exception, Task<A>> Fail)
- IfFail <A> (this Task<TryOption<A>> self)
- Match <A, R> (this Task<TryOption<A>> self, Func<A, R> Succ, Func<R> Fail)
- Match <A, R> (this Task<TryOption<A>> self, Func<A, R> Some, Func<R> None, Func<Exception, R> Fail)
- Match <A, R> (this Task<TryOption<A>> self, Func<A, R> Succ, R Fail)
- Match <A> (this Task<TryOption<A>> self, Action<A> Succ, Action Fail)
- Match <A> (this Task<TryOption<A>> self, Action<A> Some, Action None, Action<Exception> Fail)
- MatchAsync <A, R> (this Task<TryOption<A>> self, Func<A, Task<R>> Some, Func<R> None, Func<Exception, R> Fail)
- MatchAsync <A, R> (this Task<TryOption<A>> self, Func<A, Task<R>> Succ, Func<Task<R>> Fail)
- MatchAsync <A, R> (this Task<TryOption<A>> self, Func<A, Task<R>> Some, Func<Task<R>> None, Func<Exception, Task<R>> Fail)
- MatchAsync <A, R> (this Task<TryOption<A>> self, Func<A, R> Succ, Func<Task<R>> Fail)
- MatchAsync <A, R> (this Task<TryOption<A>> self, Func<A, R> Some, Func<Task<R>> None, Func<Exception, Task<R>> Fail)
- ToOption <A> (this Task<TryOption<A>> self)
- IfFailThrow <A> (this Task<TryOption<A>> self)
- Iter <A> (this Task<TryOption<A>> self, Action<A> action)
- Count <A> (this Task<TryOption<A>> self)
- ForAll <A> (this Task<TryOption<A>> self, Func<A, bool> pred)
- ForAllAsync <A> (this Task<TryOption<A>> self, Func<A, Task<bool>> pred)
- Fold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, S> folder)
- FoldAsync <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, Task<S>> folder)
- BiFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, S> Succ, Func<S, S> Fail)
- BiFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, Task<S>> Succ, Func<S, S> Fail)
- BiFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, S> Succ, Func<S, Task<S>> Fail)
- BiFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, Task<S>> Succ, Func<S, Task<S>> Fail)
- TriFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, S> Some, Func<S, S> None, Func<S, Exception, S> Fail)
- TriFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, Task<S>> Some, Func<S, S> None, Func<S, Exception, S> Fail)
- TriFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, S> Some, Func<S, Task<S>> None, Func<S, Exception, S> Fail)
- TriFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, S> Some, Func<S, S> None, Func<S, Exception, Task<S>> Fail)
- TriFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, Task<S>> Some, Func<S, Task<S>> None, Func<S, Exception, S> Fail)
- TriFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, S> Some, Func<S, Task<S>> None, Func<S, Exception, Task<S>> Fail)
- TriFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, Task<S>> Some, Func<S, Task<S>> None, Func<S, Exception, Task<S>> Fail)
- Exists <A> (this Task<TryOption<A>> self, Func<A, bool> pred)
- ExistsAsync <A> (this Task<TryOption<A>> self, Func<A, Task<bool>> pred)
- Map <A, R> (this Task<TryOption<A>> self, Func<A, R> mapper)
- MapAsync <A, R> (this Task<TryOption<A>> self, Func<A, Task<R>> mapper)
- BiMap <A, B> (this Task<TryOption<A>> self, Func<A, B> Succ, Func<B> Fail)
- BiMap <A, B> (this Task<TryOption<A>> self, Func<A, Task<B>> Succ, Func<B> Fail)
- BiMap <A, B> (this Task<TryOption<A>> self, Func<A, B> Succ, Func<Task<B>> Fail)
- BiMap <A, B> (this Task<TryOption<A>> self, Func<A, Task<B>> Succ, Func<Task<B>> Fail)
- TriMap <A, B> (this Task<TryOption<A>> self, Func<A, B> Some, Func<B> None, Func<Exception, B> Fail)
- TriMap <A, B> (this Task<TryOption<A>> self, Func<A, Task<B>> Some, Func<B> None, Func<Exception, B> Fail)
- TriMap <A, B> (this Task<TryOption<A>> self, Func<A, B> Some, Func<Task<B>> None, Func<Exception, B> Fail)
- TriMap <A, B> (this Task<TryOption<A>> self, Func<A, B> Some, Func<B> None, Func<Exception, Task<B>> Fail)
- TriMap <A, B> (this Task<TryOption<A>> self, Func<A, Task<B>> Some, Func<Task<B>> None, Func<Exception, B> Fail)
- TriMap <A, B> (this Task<TryOption<A>> self, Func<A, B> Some, Func<Task<B>> None, Func<Exception, Task<B>> Fail)
- TriMap <A, B> (this Task<TryOption<A>> self, Func<A, Task<B>> Some, Func<Task<B>> None, Func<Exception, Task<B>> Fail)
- Filter <A> (this Task<TryOption<A>> self, Func<A, bool> pred)
- Filter <A> (this Task<TryOption<A>> self, Func<A, Task<bool>> pred)
- Where <A> (this Task<TryOption<A>> self, Func<A, bool> pred)
- Where <A> (this Task<TryOption<A>> self, Func<A, Task<bool>> pred)
- AsEnumerable <A> (this Task<TryOption<A>> self)
- ToSeq <A> (this Task<TryOption<A>> self)
- ToList <A> (this Task<TryOption<A>> self)
- ToArray <A> (this Task<TryOption<A>> self)
- AsString <A> (this Task<TryOption<A>> self)
- Sum (this Task<TryOption<int>> self)
- Add <NUM, A> (this Task<TryOption<A>> lhs, Task<TryOption<A>> rhs)
- Subtract <NUM, A> (this Task<TryOption<A>> lhs, Task<TryOption<A>> rhs)
- Product <NUM, A> (this Task<TryOption<A>> lhs, Task<TryOption<A>> rhs)
- Divide <NUM, A> (this Task<TryOption<A>> lhs, Task<TryOption<A>> rhs)
- ToNullable <A> (this Task<TryOption<A>> ma)
- TryOption <A>
- TryOptionExtensionsAsync
- ToAsync <A> (this TryOption<A> self)
- IfSomeAsync <A> (this TryOption<A> self, Action<A> Some)
- IfNoneOrFailAsync <A> (this TryOption<A> self, Action None)
- IfNoneOrFailAsync <A> (this TryOption<A> self, A defaultValue)
- IfNoneOrFailAsync <A> (this TryOption<A> self, Func<A> None)
- IfNoneOrFailAsync <A> (this TryOption<A> self, Func<Task<A>> None)
- IfNoneOrFailAsync <A> ( this TryOption<A> self, Func<A> None, Func<Exception, A> Fail)
- IfNoneOrFailAsync <A> ( this TryOption<A> self, Func<Task<A>> None, Func<Exception, A> Fail)
- IfNoneOrFailAsync <A> ( this TryOption<A> self, Func<A> None, Func<Exception, Task<A>> Fail)
- IfNoneOrFailAsync <A> ( this TryOption<A> self, Func<Task<A>> None, Func<Exception, Task<A>> Fail)
- IfFailAsync <A> (this TryOption<A> self)
- IfFailAsync (this TryOption<Exception> self, Action<Exception> Fail)
- MatchAsync <A, R> (this TryOption<A> self, Func<A, R> Succ, Func<R> Fail)
- MatchAsync <A, R> (this TryOption<A> self, Func<A, R> Some, Func<R> None, Func<Exception, R> Fail)
- MatchAsync <A, R> (this TryOption<A> self, Func<A, R> Succ, R Fail)
- MatchAsync <A> (this TryOption<A> self, Action<A> Succ, Action Fail)
- MatchAsync <A> (this TryOption<A> self, Action<A> Some, Action None, Action<Exception> Fail)
- MatchAsync <A, R> (this TryOption<A> self, Func<A, Task<R>> Some, Func<R> None, Func<Exception, R> Fail)
- MatchAsync <A, R> (this TryOption<A> self, Func<A, Task<R>> Succ, Func<Task<R>> Fail)
- MatchAsync <A, R> (this TryOption<A> self, Func<A, Task<R>> Some, Func<Task<R>> None, Func<Exception, Task<R>> Fail)
- MatchAsync <A, R> (this TryOption<A> self, Func<A, R> Succ, Func<Task<R>> Fail)
- MatchAsync <A, R> (this TryOption<A> self, Func<A, R> Some, Func<Task<R>> None, Func<Exception, Task<R>> Fail)
- ToOptionAsync <A> (this TryOption<A> self)
- ToOptionUnsafeAsync <A> (this TryOption<A> self)
- ToEitherAsync <A> (this TryOption<A> self)
- ToEitherUnsafeAsync <A> (this TryOption<A> self)
- IfFailThrowAsync <A> (this TryOption<A> self)
- Select <A, U> (this TryOption<A> self, Func<A, Task<U>> select)
- IterAsync <A> (this TryOption<A> self, Action<A> action)
- CountAsync <A> (this TryOption<A> self)
- ForAllAsync <A> (this TryOption<A> self, Func<A, bool> pred)
- ForAllAsync <A> (this TryOption<A> self, Func<A, Task<bool>> pred)
- FoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, S> folder)
- FoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, Task<S>> folder)
- BiFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, S> Succ, Func<S, S> Fail)
- BiFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, Task<S>> Succ, Func<S, S> Fail)
- BiFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, S> Succ, Func<S, Task<S>> Fail)
- BiFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, Task<S>> Succ, Func<S, Task<S>> Fail)
- TriFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, S> Some, Func<S, S> None, Func<S, Exception, S> Fail)
- TriFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, Task<S>> Some, Func<S, S> None, Func<S, Exception, S> Fail)
- TriFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, S> Some, Func<S, Task<S>> None, Func<S, Exception, S> Fail)
- TriFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, S> Some, Func<S, S> None, Func<S, Exception, Task<S>> Fail)
- TriFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, Task<S>> Some, Func<S, Task<S>> None, Func<S, Exception, S> Fail)
- TriFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, S> Some, Func<S, Task<S>> None, Func<S, Exception, Task<S>> Fail)
- TriFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, Task<S>> Some, Func<S, Task<S>> None, Func<S, Exception, Task<S>> Fail)
- ExistsAsync <A> (this TryOption<A> self, Func<A, bool> pred)
- ExistsAsync <A> (this TryOption<A> self, Func<A, Task<bool>> pred)
- MapAsync <A, R> (this TryOption<A> self, Func<A, R> mapper)
- MapAsync <A, R> (this TryOption<A> self, Func<A, Task<R>> mapper)
- BiMapAsync <A, B> (this TryOption<A> self, Func<A, B> Succ, Func<B> Fail)
- BiMapAsync <A, B> (this TryOption<A> self, Func<A, Task<B>> Succ, Func<B> Fail)
- BiMapAsync <A, B> (this TryOption<A> self, Func<A, B> Succ, Func<Task<B>> Fail)
- BiMapAsync <A, B> (this TryOption<A> self, Func<A, Task<B>> Succ, Func<Task<B>> Fail)
- TriMapAsync <A, B> (this TryOption<A> self, Func<A, B> Some, Func<B> None, Func<Exception, B> Fail)
- TriMapAsync <A, B> (this TryOption<A> self, Func<A, Task<B>> Some, Func<B> None, Func<Exception, B> Fail)
- TriMapAsync <A, B> (this TryOption<A> self, Func<A, B> Some, Func<Task<B>> None, Func<Exception, B> Fail)
- TriMapAsync <A, B> (this TryOption<A> self, Func<A, B> Some, Func<B> None, Func<Exception, Task<B>> Fail)
- TriMapAsync <A, B> (this TryOption<A> self, Func<A, Task<B>> Some, Func<Task<B>> None, Func<Exception, B> Fail)
- TriMapAsync <A, B> (this TryOption<A> self, Func<A, B> Some, Func<Task<B>> None, Func<Exception, Task<B>> Fail)
- TriMapAsync <A, B> (this TryOption<A> self, Func<A, Task<B>> Some, Func<Task<B>> None, Func<Exception, Task<B>> Fail)
- FilterAsync <A> (this TryOption<A> self, Func<A, bool> pred)
- FilterAsync <A> (this TryOption<A> self, Func<A, Task<bool>> pred)
- WhereAsync <A> (this TryOption<A> self, Func<A, bool> pred)
- WhereAsync <A> (this TryOption<A> self, Func<A, Task<bool>> pred)
- ToSeqAsync <A> (this TryOption<A> self)
- AsEnumerableAsync <A> (this TryOption<A> self)
- ToListAsync <A> (this TryOption<A> self)
- ToArrayAsync <A> (this TryOption<A> self)
- AsStringAsync <A> (this TryOption<A> self)
- SumAsync (this TryOption<int> self)
- AddAsync <NUM, A> (this TryOption<A> lhs, TryOption<A> rhs)
- SubtractAsync <NUM, A> (this TryOption<A> lhs, TryOption<A> rhs)
- ProductAsync <NUM, A> (this TryOption<A> lhs, TryOption<A> rhs)
- DivideAsync <NUM, A> (this TryOption<A> lhs, TryOption<A> rhs)
- ToNullableAsync <A> (this TryOption<A> ma)
- TryOptionExtensions
- Case <A> (this TryOption<A> ma)
- Memo <A> (this TryOption<A> ma)
- Retry <A> (TryOption<A> ma, int amount = 3)
- Strict <A> (this TryOption<A> ma)
- IsSome <A> (this TryOption<A> ma)
- IsFail <A> (this TryOption<A> ma)
- IsNoneOrFail <A> (this TryOption<A> ma)
- IsNone <A> (this TryOption<A> ma)
- IfSome <A> (this TryOption<A> self, Action<A> Some)
- IfNoneOrFail <A> (this TryOption<A> self, Action None)
- IfNoneOrFail <A> (this TryOption<A> self, A defaultValue)
- IfNoneOrFail <A> (this TryOption<A> self, Func<A> None)
- IfNoneOrFail <A> ( this TryOption<A> self, Func<A> None, Func<Exception, A> Fail)
- IfFail <A> (this TryOption<A> self)
- IfFail <A> (this TryOption<A> self, Action<Exception> Fail)
- Match <A, R> (this TryOption<A> self, Func<A, R> Some, Func<R> Fail)
- Match <A, R> (this TryOption<A> self, Func<A, R> Some, Func<R> None, Func<Exception, R> Fail)
- Match <A, R> (this TryOption<A> self, Func<A, R> Some, R Fail)
- Match <A> (this TryOption<A> self, Action<A> Some, Action Fail)
- Match <A> (this TryOption<A> self, Action<A> Some, Action None, Action<Exception> Fail)
- ToEff <A> (this TryOption<A> ma)
- ToEff <A> (this TryOption<A> ma, Error None)
- ToEff <A> (this TryOption<A> ma, Func<Error> None)
- ToEff <A> (this TryOption<A> ma, A None)
- ToEff <A> (this TryOption<A> ma, Func<A> None)
- ToAff <A> (this TryOption<A> ma)
- ToAff <A> (this TryOption<A> ma, Error None)
- ToAff <A> (this TryOption<A> ma, Func<Error> None)
- ToAff <A> (this TryOption<A> ma, A None)
- ToAff <A> (this TryOption<A> ma, Func<A> None)
- ToOption <A> (this TryOption<A> self)
- ToOptionUnsafe <A> (this TryOption<A> self)
- ToValidation <A> (this TryOption<A> self)
- ToEither <A> (this TryOption<A> self)
- ToEitherUnsafe <A> (this TryOption<A> self)
- ToValidation <A, FAIL> (this TryOption<A> self, Func<Exception, FAIL> Fail)
- ToEither <A, L> (this TryOption<A> self, Func<Exception, L> Fail)
- ToEitherUnsafe <A, L> (this TryOption<A> self, Func<Exception, L> Fail)
- ToTry <A> (this TryOption<A> self)
- ToTry <A> (this TryOption<A> self, Func<A> None)
- IfFailThrow <A> (this TryOption<A> self)
- Select <A, B> (this TryOption<A> self, Func<A, B> select)
- Iter <A> (this TryOption<A> self, Action<A> action)
- Count <A> (this TryOption<A> self)
- ForAll <A> (this TryOption<A> self, Func<A, bool> pred)
- Fold <A, S> (this TryOption<A> self, S state, Func<S, A, S> folder)
- BiFold <A, S> (this TryOption<A> self, S state, Func<S, A, S> Some, Func<S, S> Fail)
- TriFold <A, S> (this TryOption<A> self, S state, Func<S, A, S> Some, Func<S, S> None, Func<S, Exception, S> Fail)
- Exists <A> (this TryOption<A> self, Func<A, bool> pred)
- Do <A> (this TryOption<A> ma, Action<A> f)
- Map <A, B> (this TryOption<A> self, Func<A, B> f)
- BiMap <A, R> (this TryOption<A> self, Func<A, R> Some, Func<R> Fail)
- TriMap <A, R> (this TryOption<A> self, Func<A, R> Some, Func<R> None, Func<Exception, R> Fail)
- ParMap <A, B, R> (this TryOption<A> self, Func<A, B, R> func)
- ParMap <A, B, C, R> (this TryOption<A> self, Func<A, B, C, R> func)
- Filter <A> (this TryOption<A> self, Func<A, bool> pred)
- Where <A> (this TryOption<A> self, Func<A, bool> pred)
- Bind <A, B> (this TryOption<A> ma, Func<A, TryOption<B>> f)
- BiBind <A, R> (this TryOption<A> self, Func<A, TryOption<R>> Some, Func<TryOption<R>> Fail)
- TriBind <A, R> (this TryOption<A> self, Func<A, TryOption<R>> Some, Func<TryOption<R>> None, Func<Exception, TryOption<R>> Fail)
- ToSeq <A> (this TryOption<A> self)
- AsEnumerable <A> (this TryOption<A> self)
- ToList <A> (this TryOption<A> self)
- ToArray <A> (this TryOption<A> self)
- Some <A, R> (this TryOption<A> self, Func<A, R> Some)
- Some <A> (this TryOption<A> self, Action<A> Some)
- AsString <A> (this TryOption<A> self)
- SelectMany <A, B, C> ( this TryOption<A> ma, Func<A, TryOption<B>> bind, Func<A, B, C> project)
- Join <A, U, K, V> ( this TryOption<A> self, TryOption<U> inner, Func<A, K> outerKeyMap, Func<U, K> innerKeyMap, Func<A, U, V> project)
- Try <T> (this TryOption<T> self)
- Use <T, U> (this TryOption<T> self, Func<T, U> select)
- Sum (this TryOption<int> self)
- MatchAsync <T, R> (this Task<TryOption<T>> self, Func<T, R> Some, Func<R> None, Func<Exception, R> Fail)
- MatchAsync <T, R> (this Task<TryOption<T>> self, Func<T, R> Some, Func<R> Fail)
- MatchAsync <T, R> (this Task<TryOption<T>> self, Func<T, Task<R>> Some, Func<R> Fail)
- Flatten <T> (this TryOption<TryOption<T>> self)
- Flatten <T> (this TryOption<TryOption<TryOption<T>>> self)
- Flatten <T> (this TryOption<TryOption<TryOption<TryOption<T>>>> self)
- Apply <A, B> (this TryOption<Func<A, B>> fab, TryOption<A> fa)
- Apply <A, B> (this Func<A, B> fab, TryOption<A> fa)
- Apply <A, B, C> (this TryOption<Func<A, B, C>> fabc, TryOption<A> fa, TryOption<B> fb)
- Apply <A, B, C> (this Func<A, B, C> fabc, TryOption<A> fa, TryOption<B> fb)
- Apply <A, B, C> (this TryOption<Func<A, B, C>> fabc, TryOption<A> fa)
- Apply <A, B, C> (this Func<A, B, C> fabc, TryOption<A> fa)
- Apply <A, B, C> (this TryOption<Func<A, Func<B, C>>> fabc, TryOption<A> fa)
- Action <A, B> (this TryOption<A> fa, TryOption<B> fb)
- Add <ARITH, A> (this TryOption<A> lhs, TryOption<A> rhs)
- Subtract <ARITH, A> (this TryOption<A> lhs, TryOption<A> rhs)
- Product <ARITH, A> (this TryOption<A> lhs, TryOption<A> rhs)
- Divide <NUM, A> (this TryOption<A> lhs, TryOption<A> rhs)
- ToNullable <A> (this TryOption<A> ma)
- Plus <A> (this TryOption<A> ma, TryOption<A> mb)
- Prelude
- TryOption <T> (Func<Option<T>> f)
- TryOption <T> (Func<T> f)
- TryOption <T> (T value)
- TryOptionSucc <T> (T value)
- TryOption <T> (Option<T> value)
- TryOptional <T> (Option<T> value)
- TryOption <T> (Exception ex)
- TryOptionFail <T> (Exception ex)
- add <NUM, A> (TryOption<A> lhs, TryOption<A> rhs)
- subtract <NUM, T> (TryOption<T> lhs, TryOption<T> rhs)
- product <NUM, T> (TryOption<T> lhs, TryOption<T> rhs)
- divide <NUM, T> (TryOption<T> lhs, TryOption<T> rhs)
- apply <A, B> (TryOption<Func<A, B>> fab, TryOption<A> fa)
- apply <A, B> (Func<A, B> fab, TryOption<A> fa)
- apply <A, B, C> (TryOption<Func<A, B, C>> fabc, TryOption<A> fa, TryOption<B> fb)
- apply <A, B, C> (Func<A, B, C> fabc, TryOption<A> fa, TryOption<B> fb)
- apply <A, B, C> ( TryOption<Func<A, B, C>> fabc, TryOption<A> fa)
- apply <A, B, C> (Func<A, B, C> fabc, TryOption<A> fa)
- apply <A, B, C> (TryOption<Func<A, Func<B, C>>> fabc, TryOption<A> fa)
- apply <A, B, C> (Func<A, Func<B, C>> fabc, TryOption<A> fa)
- action <A, B> (TryOption<A> fa, TryOption<B> fb)
- isSome <T> (TryOption<T> self)
- isNone <T> (TryOption<T> self)
- isFail <T> (TryOption<T> self)
- ifNoneOrFail <T> ( TryOption<T> self, Func<T> None, Func<Exception, T> Fail)
- ifSome <T> (TryOption<T> self, Action<T> Some)
- ifNoneOrFail <T> (TryOption<T> self, Func<T> Fail)
- ifNoneOrFail <T> (TryOption<T> self, T defaultValue)
- ifFail <T> (TryOption<T> self)
- iffFail <T> (TryOption<T> self, Action<Exception> Fail)
- failed <T> (TryOption<T> self)
- flatten <T> (TryOption<TryOption<T>> self)
- flatten <T> (TryOption<TryOption<TryOption<T>>> self)
- flatten <T> (TryOption<TryOption<TryOption<TryOption<T>>>> self)
- match <T, R> (TryOption<T> self, Func<T, R> Some, Func<R> Fail)
- match <T, R> (TryOption<T> self, Func<T, R> Some, Func<R> None, Func<Exception, R> Fail)
- match <T, R> (TryOption<T> self, Func<T, R> Some, R Fail)
- match <T> (TryOption<T> self, Action<T> Some, Action Fail)
- match <T> (TryOption<T> self, Action<T> Some, Action None, Action<Exception> Fail)
- iter <T> (TryOption<T> self, Action<T> action)
- fold <S, T> (TryOption<T> self, S state, Func<S, T, S> folder)
- bifold <S, T> (TryOption<T> self, S state, Func<S, T, S> Some, Func<S, S> Fail)
- trifold <S, T> (TryOption<T> self, S state, Func<S, T, S> Some, Func<S, S> None, Func<S, Exception, S> Fail)
- forall <T> (TryOption<T> self, Func<T, bool> pred)
- count <T> (TryOption<T> self)
- exists <T> (TryOption<T> self, Func<T, bool> pred)
- map <T, R> (TryOption<T> self, Func<T, R> mapper)
- bimap <T, R> (TryOption<T> tryDel, Func<T, R> Some, Func<R> Fail)
- trimap <T, R> (TryOption<T> tryDel, Func<T, R> Some, Func<R> None, Func<Exception, R> Fail)
- parmap <T1, T2, R> (TryOption<T1> self, Func<T1, T2, R> func)
- parmap <T1, T2, T3, R> (TryOption<T1> self, Func<T1, T2, T3, R> func)
- filter <T> (TryOption<T> self, Func<T, bool> pred)
- bind <T, R> (TryOption<T> tryDel, Func<T, TryOption<R>> binder)
- bibind <T, R> (TryOption<T> self, Func<T, TryOption<R>> Some, Func<TryOption<R>> Fail)
- tribind <T, R> (TryOption<T> self, Func<T, TryOption<R>> Some, Func<TryOption<R>> None, Func<Exception, TryOption<R>> Fail)
- toList <T> (TryOption<T> tryDel)
- toArray <T> (TryOption<T> tryDel)
- tryfun <T> (Func<TryOption<T>> tryDel)
- choice <A> (TryOption<A> ma, params TryOption<A>[] tail)
- choice <A> (Seq<TryOption<A>> xs)
- TryOptionSomeContext <T, R>
- TryOptionSomeUnitContext <T>
- TryOptionNoneContext <T, R>
- TryOptionNoneUnitContext <T>
class TaskTryOptionExtensions Source #
method TryOptionAsync<A> ToAsync <A> (this Task<TryOption<A>> self) Source #
Convert a Task<TryOption> to a TryOptionAsync
method TryOptionAsync<A> ToAsync <A> (this TryOption<Task<A>> self) Source #
Convert a Task<TryOption> to a TryOptionAsync
method Task<Unit> IfSome <A> (this Task<TryOption<A>> self, Action<A> Some) Source #
Invoke a delegate if the Try returns a value successfully
param | Some | Delegate to invoke if successful |
method Task<Unit> IfNoneOrFail <A> (this Task<TryOption<A>> self, Action None) Source #
Invoke a delegate if the Try is in a Fail or None state
param | None | Delegate to invoke if successful |
method Task<A> IfNoneOrFail <A> (this Task<TryOption<A>> self, A defaultValue) Source #
Return a default value if the Try fails
param | defaultValue | Default value to use on failure |
returns | failValue on failure, the result of the Try otherwise |
method Task<A> IfNoneOrFail <A> (this Task<TryOption<A>> self, Func<A> None) Source #
Invoke a delegate if the Try fails
param | None | Delegate to invoke on failure |
returns | Result of the invocation of Fail on failure, the result of the Try otherwise |
method Task<A> IfNoneOrFail <A> (this Task<TryOption<A>> self, Func<Task<A>> None) Source #
Invoke a delegate if the Try fails
param | None | Delegate to invoke on failure |
returns | Result of the invocation of Fail on failure, the result of the Try otherwise |
method Task<A> IfNoneOrFail <A> ( this Task<TryOption<A>> self, Func<A> None, Func<Exception, A> Fail) Source #
Invoke delegates based on None or Failed stateds
type | T | Bound value type |
param | self | Try computation |
param | None | Delegate to invoke if the result is None |
param | Fail | Delegate to invoke if the result is Fail |
returns | Success value, or the result of the None or Failed delegate |
method Task<A> IfNoneOrFail <A> ( this Task<TryOption<A>> self, Func<Task<A>> None, Func<Exception, A> Fail) Source #
Invoke delegates based on None or Failed stateds
type | T | Bound value type |
param | self | Try computation |
param | None | Delegate to invoke if the result is None |
param | Fail | Delegate to invoke if the result is Fail |
returns | Success value, or the result of the None or Failed delegate |
method Task<A> IfNoneOrFail <A> ( this Task<TryOption<A>> self, Func<A> None, Func<Exception, Task<A>> Fail) Source #
Invoke delegates based on None or Failed stateds
type | T | Bound value type |
param | self | Try computation |
param | None | Delegate to invoke if the result is None |
param | Fail | Delegate to invoke if the result is Fail |
returns | Success value, or the result of the None or Failed delegate |
method Task<A> IfNoneOrFail <A> ( this Task<TryOption<A>> self, Func<Task<A>> None, Func<Exception, Task<A>> Fail) Source #
Invoke delegates based on None or Failed stateds
type | T | Bound value type |
param | self | Try computation |
param | None | Delegate to invoke if the result is None |
param | Fail | Delegate to invoke if the result is Fail |
returns | Success value, or the result of the None or Failed delegate |
method ExceptionMatchOptionalAsync<A> IfFail <A> (this Task<TryOption<A>> self) Source #
Provides a fluent exception matching interface which is invoked when the Try fails.
returns | Fluent exception matcher |
method Task<R> Match <A, R> (this Task<TryOption<A>> self, Func<A, R> Succ, Func<R> Fail) Source #
Pattern matches the two possible states of the Try computation
type | R | Type of the resulting bound value |
param | Succ | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
returns | The result of either the Succ or Fail delegates |
method Task<R> Match <A, R> (this Task<TryOption<A>> self, Func<A, R> Some, Func<R> None, Func<Exception, R> Fail) Source #
Pattern matches the two possible states of the Try computation
type | R | Type of the resulting bound value |
param | Some | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
returns | The result of either the Succ or Fail delegates |
method Task<R> Match <A, R> (this Task<TryOption<A>> self, Func<A, R> Succ, R Fail) Source #
Pattern matches the two possible states of the Try computation
type | R | Type of the resulting bound value |
param | Succ | Delegate to invoke if the Try computation completes successfully |
param | Fail | Default value to use if the Try computation fails |
returns | The result of either the Succ delegate or the Fail value |
method Task<Unit> Match <A> (this Task<TryOption<A>> self, Action<A> Succ, Action Fail) Source #
Pattern matches the two possible states of the Try computation
param | Succ | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
method Task<Unit> Match <A> (this Task<TryOption<A>> self, Action<A> Some, Action None, Action<Exception> Fail) Source #
Pattern matches the two possible states of the Try computation
param | Some | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
method Task<R> MatchAsync <A, R> (this Task<TryOption<A>> self, Func<A, Task<R>> Some, Func<R> None, Func<Exception, R> Fail) Source #
Pattern matches the three possible states of the computation computation
type | R | Type of the resulting bound value |
param | Some | Delegate to invoke if the computation completes successfully |
param | None | Delegate to invoke if the computation completes successfully but returns no value |
param | Fail | Delegate to invoke if the computation fails |
returns | The result of either the Succ, None, or Fail delegate |
method Task<R> MatchAsync <A, R> (this Task<TryOption<A>> self, Func<A, Task<R>> Succ, Func<Task<R>> Fail) Source #
Pattern matches the three possible states of the computation computation
type | R | Type of the resulting bound value |
param | Succ | Delegate to invoke if the computation completes successfully |
param | Fail | Delegate to invoke if the computation fails |
returns | The result of either the Succ, None, or Fail delegate |
method Task<R> MatchAsync <A, R> (this Task<TryOption<A>> self, Func<A, Task<R>> Some, Func<Task<R>> None, Func<Exception, Task<R>> Fail) Source #
Pattern matches the three possible states of the computation
type | R | Type of the resulting bound value |
param | Some | Delegate to invoke if the computation completes successfully |
param | None | Delegate to invoke if the computation completes successfully but returns no value |
param | Fail | Delegate to invoke if the computation fails |
returns | The result of either the Some, None, or Fail delegate |
method Task<R> MatchAsync <A, R> (this Task<TryOption<A>> self, Func<A, R> Succ, Func<Task<R>> Fail) Source #
Pattern matches the three possible states of the computation computation
type | R | Type of the resulting bound value |
param | Succ | Delegate to invoke if the computation completes successfully |
param | Fail | Delegate to invoke if the computation fails |
returns | The result of either the Succ, Fail delegate |
method Task<R> MatchAsync <A, R> (this Task<TryOption<A>> self, Func<A, R> Some, Func<Task<R>> None, Func<Exception, Task<R>> Fail) Source #
Pattern matches the three possible states of the computation
type | R | Type of the resulting bound value |
param | Some | Delegate to invoke if the computation completes successfully |
param | None | Delegate to invoke if the computation completes successfully but returns no value |
param | Fail | Delegate to invoke if the computation fails |
returns | The result of either the Some, None, or Fail delegate |
method Task<A> IfFailThrow <A> (this Task<TryOption<A>> self) Source #
method Task<Unit> Iter <A> (this Task<TryOption<A>> self, Action<A> action) Source #
Apply Try values to a Try function of arity 2
param | self | Try function |
param | arg1 | Try argument |
param | arg2 | Try argument |
returns | Returns the result of applying the Try arguments to the Try function |
method Task<int> Count <A> (this Task<TryOption<A>> self) Source #
Counts the number of bound values.
type | T | Type of the bound value |
param | self | TrTry computation |
returns | 1 if the Try computation is successful, 0 otherwise. |
method Task<bool> ForAll <A> (this Task<TryOption<A>> self, Func<A, bool> pred) Source #
Tests that a predicate holds for all values of the bound value T
type | T | Type of the bound value |
param | self | Try computation |
param | pred | Predicate to test the bound value against |
returns | True if the predicate holds for the bound value, or if the Try computation fails. False otherwise. |
method Task<bool> ForAllAsync <A> (this Task<TryOption<A>> self, Func<A, Task<bool>> pred) Source #
Tests that a predicate holds for all values of the bound value T
type | T | Type of the bound value |
param | self | Try computation |
param | pred | Predicate to test the bound value against |
returns | True if the predicate holds for the bound value, or if the Try computation fails. False otherwise. |
method Task<S> Fold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, S> folder) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method Task<S> FoldAsync <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, Task<S>> folder) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method Task<S> BiFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, S> Succ, Func<S, S> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Succ | Fold function for Success |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> BiFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, Task<S>> Succ, Func<S, S> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Succ | Fold function for Success |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> BiFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, S> Succ, Func<S, Task<S>> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Succ | Fold function for Success |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> BiFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, Task<S>> Succ, Func<S, Task<S>> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Succ | Fold function for Success |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> TriFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, S> Some, Func<S, S> None, Func<S, Exception, S> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | None | Fold function for None |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> TriFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, Task<S>> Some, Func<S, S> None, Func<S, Exception, S> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | None | Fold function for None |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> TriFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, S> Some, Func<S, Task<S>> None, Func<S, Exception, S> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | None | Fold function for None |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> TriFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, S> Some, Func<S, S> None, Func<S, Exception, Task<S>> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | None | Fold function for None |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> TriFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, Task<S>> Some, Func<S, Task<S>> None, Func<S, Exception, S> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | None | Fold function for None |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> TriFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, S> Some, Func<S, Task<S>> None, Func<S, Exception, Task<S>> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | None | Fold function for None |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> TriFold <A, S> (this Task<TryOption<A>> self, S state, Func<S, A, Task<S>> Some, Func<S, Task<S>> None, Func<S, Exception, Task<S>> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | None | Fold function for None |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<bool> Exists <A> (this Task<TryOption<A>> self, Func<A, bool> pred) Source #
Tests that a predicate holds for any value of the bound value T
type | A | Type of the bound value |
param | self | Try computation |
param | pred | Predicate to test the bound value against |
returns | True if the predicate holds for the bound value. False otherwise. |
method Task<bool> ExistsAsync <A> (this Task<TryOption<A>> self, Func<A, Task<bool>> pred) Source #
Tests that a predicate holds for any value of the bound value T
type | A | Type of the bound value |
param | self | Try computation |
param | pred | Predicate to test the bound value against |
returns | True if the predicate holds for the bound value. False otherwise. |
method TryOptionAsync<R> Map <A, R> (this Task<TryOption<A>> self, Func<A, R> mapper) Source #
Maps the bound value
type | A | Type of the bound value |
type | R | Resulting bound value type |
param | self | Try computation |
param | mapper | Delegate to map the bound value |
returns | Mapped Try computation |
method TryOptionAsync<R> MapAsync <A, R> (this Task<TryOption<A>> self, Func<A, Task<R>> mapper) Source #
Maps the bound value
type | A | Type of the bound value |
type | R | Resulting bound value type |
param | self | Try computation |
param | mapper | Delegate to map the bound value |
returns | Mapped Try computation |
method TryOptionAsync<B> BiMap <A, B> (this Task<TryOption<A>> self, Func<A, B> Succ, Func<B> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Succ | Delegate to map the bound value |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> BiMap <A, B> (this Task<TryOption<A>> self, Func<A, Task<B>> Succ, Func<B> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Succ | Delegate to map the bound value |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> BiMap <A, B> (this Task<TryOption<A>> self, Func<A, B> Succ, Func<Task<B>> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Succ | Delegate to map the bound value |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> BiMap <A, B> (this Task<TryOption<A>> self, Func<A, Task<B>> Succ, Func<Task<B>> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Succ | Delegate to map the bound value |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> TriMap <A, B> (this Task<TryOption<A>> self, Func<A, B> Some, Func<B> None, Func<Exception, B> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Some | Delegate to map the bound value |
param | None | Delegate to map the None to the desired bound result type |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> TriMap <A, B> (this Task<TryOption<A>> self, Func<A, Task<B>> Some, Func<B> None, Func<Exception, B> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Some | Delegate to map the bound value |
param | None | Delegate to map the None to the desired bound result type |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> TriMap <A, B> (this Task<TryOption<A>> self, Func<A, B> Some, Func<Task<B>> None, Func<Exception, B> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Some | Delegate to map the bound value |
param | None | Delegate to map the None to the desired bound result type |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> TriMap <A, B> (this Task<TryOption<A>> self, Func<A, B> Some, Func<B> None, Func<Exception, Task<B>> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Some | Delegate to map the bound value |
param | None | Delegate to map the None to the desired bound result type |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> TriMap <A, B> (this Task<TryOption<A>> self, Func<A, Task<B>> Some, Func<Task<B>> None, Func<Exception, B> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Some | Delegate to map the bound value |
param | None | Delegate to map the None to the desired bound result type |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> TriMap <A, B> (this Task<TryOption<A>> self, Func<A, B> Some, Func<Task<B>> None, Func<Exception, Task<B>> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Some | Delegate to map the bound value |
param | None | Delegate to map the None to the desired bound result type |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> TriMap <A, B> (this Task<TryOption<A>> self, Func<A, Task<B>> Some, Func<Task<B>> None, Func<Exception, Task<B>> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Some | Delegate to map the bound value |
param | None | Delegate to map the None to the desired bound result type |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<A> Filter <A> (this Task<TryOption<A>> self, Func<A, Task<bool>> pred) Source #
method TryOptionAsync<A> Where <A> (this Task<TryOption<A>> self, Func<A, Task<bool>> pred) Source #
method Task<Seq<A>> AsEnumerable <A> (this Task<TryOption<A>> self) Source #
method TryOptionAsync<A> Add <NUM, A> (this Task<TryOption<A>> lhs, Task<TryOption<A>> rhs) Source #
Add the bound value of Try(x) to Try(y). If either of the Trys are Fail then the result is Fail
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs + rhs |
method TryOptionAsync<A> Subtract <NUM, A> (this Task<TryOption<A>> lhs, Task<TryOption<A>> rhs) Source #
Find the subtract of the bound value of Try(x) and Try(y). If either of the Trys are Fail then the result is Fail
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs + rhs |
method TryOptionAsync<A> Product <NUM, A> (this Task<TryOption<A>> lhs, Task<TryOption<A>> rhs) Source #
Multiply the bound value of Try(x) and Try(y). If either of the Trys are Fail then the result is Fail
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs + rhs |
method TryOptionAsync<A> Divide <NUM, A> (this Task<TryOption<A>> lhs, Task<TryOption<A>> rhs) Source #
Multiply the bound value of Try(x) and Try(y). If either of the Trys are Fail then the result is Fail
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs + rhs |
method Task<A?> ToNullable <A> (this Task<TryOption<A>> ma) Source #
Convert the Try type to a Nullable of A
type | A | Type of the bound value |
param | ma | Try to convert |
returns | Nullable of A |
delegate TryOption <A> Source #
The Try monad captures exceptions and uses them to cancel the computation. Primarily useful for expression based processing of errors.
To invoke directly, call x.Try()
returns | A value that represents the outcome of the computation, either Some, None, or Failure |
class TryOptionExtensionsAsync Source #
Extension methods for the Try monad
method TryOptionAsync<A> ToAsync <A> (this TryOption<A> self) Source #
Converts this TryOption to a TryOptionAsync
type | A | Bound value type |
param | self | This |
returns | Asynchronous TryOption |
method Task<Unit> IfSomeAsync <A> (this TryOption<A> self, Action<A> Some) Source #
Invoke a delegate if the Try returns a value successfully
param | Some | Delegate to invoke if successful |
method Task<Unit> IfNoneOrFailAsync <A> (this TryOption<A> self, Action None) Source #
Invoke a delegate if the Try is in a Fail or None state
param | None | Delegate to invoke if successful |
method Task<A> IfNoneOrFailAsync <A> (this TryOption<A> self, A defaultValue) Source #
Return a default value if the Try fails
param | defaultValue | Default value to use on failure |
returns | failValue on failure, the result of the Try otherwise |
method Task<A> IfNoneOrFailAsync <A> (this TryOption<A> self, Func<A> None) Source #
Invoke a delegate if the Try fails
param | None | Delegate to invoke on failure |
returns | Result of the invocation of Fail on failure, the result of the Try otherwise |
method Task<A> IfNoneOrFailAsync <A> (this TryOption<A> self, Func<Task<A>> None) Source #
Invoke a delegate if the Try fails
param | None | Delegate to invoke on failure |
returns | Result of the invocation of Fail on failure, the result of the Try otherwise |
method Task<A> IfNoneOrFailAsync <A> ( this TryOption<A> self, Func<A> None, Func<Exception, A> Fail) Source #
Invoke delegates based on None or Failed stateds
type | T | Bound value type |
param | self | Try computation |
param | None | Delegate to invoke if the result is None |
param | Fail | Delegate to invoke if the result is Fail |
returns | Success value, or the result of the None or Failed delegate |
method Task<A> IfNoneOrFailAsync <A> ( this TryOption<A> self, Func<Task<A>> None, Func<Exception, A> Fail) Source #
Invoke delegates based on None or Failed stateds
type | T | Bound value type |
param | self | Try computation |
param | None | Delegate to invoke if the result is None |
param | Fail | Delegate to invoke if the result is Fail |
returns | Success value, or the result of the None or Failed delegate |
method Task<A> IfNoneOrFailAsync <A> ( this TryOption<A> self, Func<A> None, Func<Exception, Task<A>> Fail) Source #
Invoke delegates based on None or Failed stateds
type | T | Bound value type |
param | self | Try computation |
param | None | Delegate to invoke if the result is None |
param | Fail | Delegate to invoke if the result is Fail |
returns | Success value, or the result of the None or Failed delegate |
method Task<A> IfNoneOrFailAsync <A> ( this TryOption<A> self, Func<Task<A>> None, Func<Exception, Task<A>> Fail) Source #
Invoke delegates based on None or Failed stateds
type | T | Bound value type |
param | self | Try computation |
param | None | Delegate to invoke if the result is None |
param | Fail | Delegate to invoke if the result is Fail |
returns | Success value, or the result of the None or Failed delegate |
method ExceptionMatchOptionalAsync<A> IfFailAsync <A> (this TryOption<A> self) Source #
Provides a fluent exception matching interface which is invoked when the Try fails.
returns | Fluent exception matcher |
method Task<Unit> IfFailAsync (this TryOption<Exception> self, Action<Exception> Fail) Source #
Invoke a delegate if failed
param | self | The TryOption computation |
param | Fail | The delegate to invoke if the TryOption computation fails |
returns |
method Task<R> MatchAsync <A, R> (this TryOption<A> self, Func<A, R> Succ, Func<R> Fail) Source #
Pattern matches the two possible states of the Try computation
type | R | Type of the resulting bound value |
param | Succ | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
returns | The result of either the Succ or Fail delegates |
method Task<R> MatchAsync <A, R> (this TryOption<A> self, Func<A, R> Some, Func<R> None, Func<Exception, R> Fail) Source #
Pattern matches the two possible states of the Try computation
type | R | Type of the resulting bound value |
param | Some | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
returns | The result of either the Succ or Fail delegates |
method Task<R> MatchAsync <A, R> (this TryOption<A> self, Func<A, R> Succ, R Fail) Source #
Pattern matches the two possible states of the Try computation
type | R | Type of the resulting bound value |
param | Succ | Delegate to invoke if the Try computation completes successfully |
param | Fail | Default value to use if the Try computation fails |
returns | The result of either the Succ delegate or the Fail value |
method Task<Unit> MatchAsync <A> (this TryOption<A> self, Action<A> Succ, Action Fail) Source #
Pattern matches the two possible states of the Try computation
param | Succ | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
method Task<Unit> MatchAsync <A> (this TryOption<A> self, Action<A> Some, Action None, Action<Exception> Fail) Source #
Pattern matches the two possible states of the Try computation
param | Some | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
method Task<R> MatchAsync <A, R> (this TryOption<A> self, Func<A, Task<R>> Some, Func<R> None, Func<Exception, R> Fail) Source #
Pattern matches the three possible states of the computation computation
type | R | Type of the resulting bound value |
param | Some | Delegate to invoke if the computation completes successfully |
param | None | Delegate to invoke if the computation completes successfully but returns no value |
param | Fail | Delegate to invoke if the computation fails |
returns | The result of either the Succ, None, or Fail delegate |
method Task<R> MatchAsync <A, R> (this TryOption<A> self, Func<A, Task<R>> Succ, Func<Task<R>> Fail) Source #
Pattern matches the three possible states of the computation computation
type | R | Type of the resulting bound value |
param | Succ | Delegate to invoke if the computation completes successfully |
param | Fail | Delegate to invoke if the computation fails |
returns | The result of either the Succ, None, or Fail delegate |
method Task<R> MatchAsync <A, R> (this TryOption<A> self, Func<A, Task<R>> Some, Func<Task<R>> None, Func<Exception, Task<R>> Fail) Source #
Pattern matches the three possible states of the computation
type | R | Type of the resulting bound value |
param | Some | Delegate to invoke if the computation completes successfully |
param | None | Delegate to invoke if the computation completes successfully but returns no value |
param | Fail | Delegate to invoke if the computation fails |
returns | The result of either the Some, None, or Fail delegate |
method Task<R> MatchAsync <A, R> (this TryOption<A> self, Func<A, R> Succ, Func<Task<R>> Fail) Source #
Pattern matches the three possible states of the computation computation
type | R | Type of the resulting bound value |
param | Succ | Delegate to invoke if the computation completes successfully |
param | Fail | Delegate to invoke if the computation fails |
returns | The result of either the Succ, Fail delegate |
method Task<R> MatchAsync <A, R> (this TryOption<A> self, Func<A, R> Some, Func<Task<R>> None, Func<Exception, Task<R>> Fail) Source #
Pattern matches the three possible states of the computation
type | R | Type of the resulting bound value |
param | Some | Delegate to invoke if the computation completes successfully |
param | None | Delegate to invoke if the computation completes successfully but returns no value |
param | Fail | Delegate to invoke if the computation fails |
returns | The result of either the Some, None, or Fail delegate |
method Task<Option<A>> ToOptionAsync <A> (this TryOption<A> self) Source #
method Task<OptionUnsafe<A>> ToOptionUnsafeAsync <A> (this TryOption<A> self) Source #
method Task<Either<Exception, Option<A>>> ToEitherAsync <A> (this TryOption<A> self) Source #
method Task<EitherUnsafe<Exception, Option<A>>> ToEitherUnsafeAsync <A> (this TryOption<A> self) Source #
method Task<A> IfFailThrowAsync <A> (this TryOption<A> self) Source #
method Task<Unit> IterAsync <A> (this TryOption<A> self, Action<A> action) Source #
Apply Try values to a Try function of arity 2
param | self | Try function |
param | arg1 | Try argument |
param | arg2 | Try argument |
returns | Returns the result of applying the Try arguments to the Try function |
method Task<int> CountAsync <A> (this TryOption<A> self) Source #
Counts the number of bound values.
type | T | Type of the bound value |
param | self | TrTry computation |
returns | 1 if the Try computation is successful, 0 otherwise. |
method Task<bool> ForAllAsync <A> (this TryOption<A> self, Func<A, bool> pred) Source #
Tests that a predicate holds for all values of the bound value T
type | T | Type of the bound value |
param | self | Try computation |
param | pred | Predicate to test the bound value against |
returns | True if the predicate holds for the bound value, or if the Try computation fails. False otherwise. |
method Task<bool> ForAllAsync <A> (this TryOption<A> self, Func<A, Task<bool>> pred) Source #
Tests that a predicate holds for all values of the bound value T
type | T | Type of the bound value |
param | self | Try computation |
param | pred | Predicate to test the bound value against |
returns | True if the predicate holds for the bound value, or if the Try computation fails. False otherwise. |
method Task<S> FoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, S> folder) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method Task<S> FoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, Task<S>> folder) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method Task<S> BiFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, S> Succ, Func<S, S> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Succ | Fold function for Success |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> BiFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, Task<S>> Succ, Func<S, S> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Succ | Fold function for Success |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> BiFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, S> Succ, Func<S, Task<S>> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Succ | Fold function for Success |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> BiFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, Task<S>> Succ, Func<S, Task<S>> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Succ | Fold function for Success |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> TriFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, S> Some, Func<S, S> None, Func<S, Exception, S> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | None | Fold function for None |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> TriFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, Task<S>> Some, Func<S, S> None, Func<S, Exception, S> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | None | Fold function for None |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> TriFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, S> Some, Func<S, Task<S>> None, Func<S, Exception, S> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | None | Fold function for None |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> TriFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, S> Some, Func<S, S> None, Func<S, Exception, Task<S>> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | None | Fold function for None |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> TriFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, Task<S>> Some, Func<S, Task<S>> None, Func<S, Exception, S> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | None | Fold function for None |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> TriFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, S> Some, Func<S, Task<S>> None, Func<S, Exception, Task<S>> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | None | Fold function for None |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<S> TriFoldAsync <A, S> (this TryOption<A> self, S state, Func<S, A, Task<S>> Some, Func<S, Task<S>> None, Func<S, Exception, Task<S>> Fail) Source #
Folds Try value into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | None | Fold function for None |
param | Fail | Fold function for Failure |
returns | Folded state |
method Task<bool> ExistsAsync <A> (this TryOption<A> self, Func<A, bool> pred) Source #
Tests that a predicate holds for any value of the bound value T
type | A | Type of the bound value |
param | self | Try computation |
param | pred | Predicate to test the bound value against |
returns | True if the predicate holds for the bound value. False otherwise. |
method Task<bool> ExistsAsync <A> (this TryOption<A> self, Func<A, Task<bool>> pred) Source #
Tests that a predicate holds for any value of the bound value T
type | A | Type of the bound value |
param | self | Try computation |
param | pred | Predicate to test the bound value against |
returns | True if the predicate holds for the bound value. False otherwise. |
method TryOptionAsync<R> MapAsync <A, R> (this TryOption<A> self, Func<A, R> mapper) Source #
Maps the bound value
type | A | Type of the bound value |
type | R | Resulting bound value type |
param | self | Try computation |
param | mapper | Delegate to map the bound value |
returns | Mapped Try computation |
method TryOptionAsync<R> MapAsync <A, R> (this TryOption<A> self, Func<A, Task<R>> mapper) Source #
Maps the bound value
type | A | Type of the bound value |
type | R | Resulting bound value type |
param | self | Try computation |
param | mapper | Delegate to map the bound value |
returns | Mapped Try computation |
method TryOptionAsync<B> BiMapAsync <A, B> (this TryOption<A> self, Func<A, B> Succ, Func<B> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Succ | Delegate to map the bound value |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> BiMapAsync <A, B> (this TryOption<A> self, Func<A, Task<B>> Succ, Func<B> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Succ | Delegate to map the bound value |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> BiMapAsync <A, B> (this TryOption<A> self, Func<A, B> Succ, Func<Task<B>> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Succ | Delegate to map the bound value |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> BiMapAsync <A, B> (this TryOption<A> self, Func<A, Task<B>> Succ, Func<Task<B>> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Succ | Delegate to map the bound value |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> TriMapAsync <A, B> (this TryOption<A> self, Func<A, B> Some, Func<B> None, Func<Exception, B> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Some | Delegate to map the bound value |
param | None | Delegate to map the None to the desired bound result type |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> TriMapAsync <A, B> (this TryOption<A> self, Func<A, Task<B>> Some, Func<B> None, Func<Exception, B> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Some | Delegate to map the bound value |
param | None | Delegate to map the None to the desired bound result type |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> TriMapAsync <A, B> (this TryOption<A> self, Func<A, B> Some, Func<Task<B>> None, Func<Exception, B> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Some | Delegate to map the bound value |
param | None | Delegate to map the None to the desired bound result type |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> TriMapAsync <A, B> (this TryOption<A> self, Func<A, B> Some, Func<B> None, Func<Exception, Task<B>> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Some | Delegate to map the bound value |
param | None | Delegate to map the None to the desired bound result type |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> TriMapAsync <A, B> (this TryOption<A> self, Func<A, Task<B>> Some, Func<Task<B>> None, Func<Exception, B> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Some | Delegate to map the bound value |
param | None | Delegate to map the None to the desired bound result type |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> TriMapAsync <A, B> (this TryOption<A> self, Func<A, B> Some, Func<Task<B>> None, Func<Exception, Task<B>> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Some | Delegate to map the bound value |
param | None | Delegate to map the None to the desired bound result type |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<B> TriMapAsync <A, B> (this TryOption<A> self, Func<A, Task<B>> Some, Func<Task<B>> None, Func<Exception, Task<B>> Fail) Source #
Maps the bound value
type | A | Type of the bound value |
type | B | Resulting bound value type |
param | self | computation |
param | Some | Delegate to map the bound value |
param | None | Delegate to map the None to the desired bound result type |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped computation |
method TryOptionAsync<A> FilterAsync <A> (this TryOption<A> self, Func<A, bool> pred) Source #
method TryOptionAsync<A> FilterAsync <A> (this TryOption<A> self, Func<A, Task<bool>> pred) Source #
method TryOptionAsync<A> WhereAsync <A> (this TryOption<A> self, Func<A, bool> pred) Source #
method TryOptionAsync<A> WhereAsync <A> (this TryOption<A> self, Func<A, Task<bool>> pred) Source #
method Task<Seq<A>> ToSeqAsync <A> (this TryOption<A> self) Source #
method Task<Seq<A>> AsEnumerableAsync <A> (this TryOption<A> self) Source #
method Task<Lst<A>> ToListAsync <A> (this TryOption<A> self) Source #
method Task<Arr<A>> ToArrayAsync <A> (this TryOption<A> self) Source #
method Task<string> AsStringAsync <A> (this TryOption<A> self) Source #
method TryOptionAsync<A> AddAsync <NUM, A> (this TryOption<A> lhs, TryOption<A> rhs) Source #
Add the bound value of Try(x) to Try(y). If either of the Trys are Fail then the result is Fail
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs + rhs |
method TryOptionAsync<A> SubtractAsync <NUM, A> (this TryOption<A> lhs, TryOption<A> rhs) Source #
Find the subtract of the bound value of Try(x) and Try(y). If either of the Trys are Fail then the result is Fail
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs + rhs |
method TryOptionAsync<A> ProductAsync <NUM, A> (this TryOption<A> lhs, TryOption<A> rhs) Source #
Multiply the bound value of Try(x) and Try(y). If either of the Trys are Fail then the result is Fail
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs + rhs |
method TryOptionAsync<A> DivideAsync <NUM, A> (this TryOption<A> lhs, TryOption<A> rhs) Source #
Multiply the bound value of Try(x) and Try(y). If either of the Trys are Fail then the result is Fail
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs + rhs |
method Task<A?> ToNullableAsync <A> (this TryOption<A> ma) Source #
Convert the Try type to a Nullable of A
type | A | Type of the bound value |
param | ma | Try to convert |
returns | Nullable of A |
class TryOptionExtensions Source #
Extension methods for the Try monad
method object Case <A> (this TryOption<A> ma) Source #
Use for pattern-matching the case of the target
TryOption Some = result is A
TryOption None = result is null
TryOption Fail = result is LanguageExt.Common.Error
method TryOption<A> Memo <A> (this TryOption<A> ma) Source #
Memoize the computation so that it's only run once
method TryOption<A> Retry <A> (TryOption<A> ma, int amount = 3) Source #
If the TryOption fails, retry amount
times
type | A | Type of bound value |
param | ma | TryOption |
param | amount | Amount of retries |
returns | TryOption |
method TryOption<A> Strict <A> (this TryOption<A> ma) Source #
Forces evaluation of the lazy TryOption
type | A | Bound value type |
param | ma | Computation to evaluate |
returns | The TryOption with the computation executed |
method bool IsSome <A> (this TryOption<A> ma) Source #
Test if the TryOption is in a success state
type | A | Bound value type |
param | ma | Computation to evaluate |
returns | True if computation has succeeded |
method bool IsFail <A> (this TryOption<A> ma) Source #
Test if the TryOption is in a Fail state
type | A | Bound value type |
param | ma | Computation to evaluate |
returns | True if computation is faulted |
method bool IsNoneOrFail <A> (this TryOption<A> ma) Source #
Test if the TryOption is in a None or Fail state
type | A | Bound value type |
param | ma | Computation to evaluate |
returns | True if computation is faulted |
method bool IsNone <A> (this TryOption<A> ma) Source #
Test if the TryOption is in a None state
type | A | Bound value type |
param | ma | Computation to evaluate |
returns | True if computation is faulted |
method Unit IfSome <A> (this TryOption<A> self, Action<A> Some) Source #
Invoke a delegate if the Try returns a value successfully
param | Some | Delegate to invoke if successful |
method Unit IfNoneOrFail <A> (this TryOption<A> self, Action None) Source #
Invoke a delegate if the Try is in a Fail or None state
param | None | Delegate to invoke if successful |
method A IfNoneOrFail <A> (this TryOption<A> self, A defaultValue) Source #
Return a default value if the Try fails
param | defaultValue | Default value to use on failure |
returns | failValue on failure, the result of the Try otherwise |
method A IfNoneOrFail <A> (this TryOption<A> self, Func<A> None) Source #
Invoke a delegate if the Try fails
param | None | Delegate to invoke on failure |
returns | Result of the invocation of Fail on failure, the result of the Try otherwise |
method A IfNoneOrFail <A> ( this TryOption<A> self, Func<A> None, Func<Exception, A> Fail) Source #
Invoke delegates based on None or Failed stateds
type | T | Bound value type |
param | self | Try computation |
param | None | Delegate to invoke if the result is None |
param | Fail | Delegate to invoke if the result is Fail |
returns | Success value, or the result of the None or Failed delegate |
method ExceptionMatch<Option<A>> IfFail <A> (this TryOption<A> self) Source #
Provides a fluent exception matching interface which is invoked when the Try fails.
returns | Fluent exception matcher |
method Unit IfFail <A> (this TryOption<A> self, Action<Exception> Fail) Source #
Invoke a delegate if the Try fails
type | A | Type of bound value |
param | self | TryOption computation |
param | Fail | Delegate to run on failure |
returns |
method R Match <A, R> (this TryOption<A> self, Func<A, R> Some, Func<R> Fail) Source #
Pattern matches the two possible states of the Try computation
type | R | Type of the resulting bound value |
param | Some | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
returns | The result of either the Succ or Fail delegates |
method R Match <A, R> (this TryOption<A> self, Func<A, R> Some, Func<R> None, Func<Exception, R> Fail) Source #
Pattern matches the two possible states of the Try computation
type | R | Type of the resulting bound value |
param | Some | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
returns | The result of either the Succ or Fail delegates |
method R Match <A, R> (this TryOption<A> self, Func<A, R> Some, R Fail) Source #
Pattern matches the two possible states of the Try computation
type | R | Type of the resulting bound value |
param | Some | Delegate to invoke if the Try computation completes successfully |
param | Fail | Default value to use if the Try computation fails |
returns | The result of either the Succ delegate or the Fail value |
method Unit Match <A> (this TryOption<A> self, Action<A> Some, Action Fail) Source #
Pattern matches the two possible states of the Try computation
param | Some | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
method Unit Match <A> (this TryOption<A> self, Action<A> Some, Action None, Action<Exception> Fail) Source #
Pattern matches the two possible states of the Try computation
param | Some | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
method Eff<A> ToEff <A> (this TryOption<A> ma) Source #
Convert the structure to an Eff
returns | An Eff representation of the structure |
method Eff<A> ToEff <A> (this TryOption<A> ma, Error None) Source #
Convert the structure to an Eff
returns | An Eff representation of the structure |
method Eff<A> ToEff <A> (this TryOption<A> ma, Func<Error> None) Source #
Convert the structure to an Eff
returns | An Eff representation of the structure |
method Eff<A> ToEff <A> (this TryOption<A> ma, A None) Source #
Convert the structure to an Eff
returns | An Eff representation of the structure |
method Eff<A> ToEff <A> (this TryOption<A> ma, Func<A> None) Source #
Convert the structure to an Eff
returns | An Eff representation of the structure |
method Aff<A> ToAff <A> (this TryOption<A> ma) Source #
Convert the structure to an Aff
returns | An Aff representation of the structure |
method Aff<A> ToAff <A> (this TryOption<A> ma, Error None) Source #
Convert the structure to an Aff
returns | An Aff representation of the structure |
method Aff<A> ToAff <A> (this TryOption<A> ma, Func<Error> None) Source #
Convert the structure to an Aff
returns | An Aff representation of the structure |
method Aff<A> ToAff <A> (this TryOption<A> ma, A None) Source #
Convert the structure to an Aff
returns | An Aff representation of the structure |
method Aff<A> ToAff <A> (this TryOption<A> ma, Func<A> None) Source #
Convert the structure to an Aff
returns | An Aff representation of the structure |
method OptionUnsafe<A> ToOptionUnsafe <A> (this TryOption<A> self) Source #
method Validation<Exception, Option<A>> ToValidation <A> (this TryOption<A> self) Source #
method EitherUnsafe<Exception, Option<A>> ToEitherUnsafe <A> (this TryOption<A> self) Source #
method Validation<FAIL, Option<A>> ToValidation <A, FAIL> (this TryOption<A> self, Func<Exception, FAIL> Fail) Source #
method Either<L, Option<A>> ToEither <A, L> (this TryOption<A> self, Func<Exception, L> Fail) Source #
method EitherUnsafe<L, Option<A>> ToEitherUnsafe <A, L> (this TryOption<A> self, Func<Exception, L> Fail) Source #
method A IfFailThrow <A> (this TryOption<A> self) Source #
method Unit Iter <A> (this TryOption<A> self, Action<A> action) Source #
Apply Try values to a Try function of arity 2
param | self | Try function |
param | arg1 | Try argument |
param | arg2 | Try argument |
returns | Returns the result of applying the Try arguments to the Try function |
method int Count <A> (this TryOption<A> self) Source #
Counts the number of bound values.
type | T | Type of the bound value |
param | self | TrTry computation |
returns | 1 if the Try computation is successful, 0 otherwise. |
method bool ForAll <A> (this TryOption<A> self, Func<A, bool> pred) Source #
Tests that a predicate holds for all values of the bound value T
type | T | Type of the bound value |
param | self | Try computation |
param | pred | Predicate to test the bound value against |
returns | True if the predicate holds for the bound value, or if the Try computation fails. False otherwise. |
method S Fold <A, S> (this TryOption<A> self, S state, Func<S, A, S> folder) Source #
Folds Try value into an S. wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method S BiFold <A, S> (this TryOption<A> self, S state, Func<S, A, S> Some, Func<S, S> Fail) Source #
Folds Try value into an S. wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | Fail | Fold function for Failure |
returns | Folded state |
method S TriFold <A, S> (this TryOption<A> self, S state, Func<S, A, S> Some, Func<S, S> None, Func<S, Exception, S> Fail) Source #
Folds Try value into an S. wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | Some | Fold function for Success |
param | Fail | Fold function for Failure |
returns | Folded state |
method bool Exists <A> (this TryOption<A> self, Func<A, bool> pred) Source #
Tests that a predicate holds for any value of the bound value T
type | T | Type of the bound value |
param | self | Try computation |
param | pred | Predicate to test the bound value against |
returns | True if the predicate holds for the bound value. False otherwise. |
method TryOption<A> Do <A> (this TryOption<A> ma, Action<A> f) Source #
Impure iteration of the bound value in the structure
returns | Returns the original unmodified structure |
method TryOption<B> Map <A, B> (this TryOption<A> self, Func<A, B> f) Source #
Maps the bound value
type | T | Type of the bound value |
type | R | Resulting bound value type |
param | self | Try computation |
param | mapper | Delegate to map the bound value |
returns | Mapped Try computation |
method TryOption<R> BiMap <A, R> (this TryOption<A> self, Func<A, R> Some, Func<R> Fail) Source #
Maps the bound value
type | T | Type of the bound value |
type | R | Resulting bound value type |
param | self | Try computation |
param | Some | Delegate to map the bound value |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped Try computation |
method TryOption<R> TriMap <A, R> (this TryOption<A> self, Func<A, R> Some, Func<R> None, Func<Exception, R> Fail) Source #
Maps the bound value
type | T | Type of the bound value |
type | R | Resulting bound value type |
param | self | Try computation |
param | Some | Delegate to map the bound value |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped Try computation |
method TryOption<Func<B, R>> ParMap <A, B, R> (this TryOption<A> self, Func<A, B, R> func) Source #
Partial application map
method TryOption<Func<B, Func<C, R>>> ParMap <A, B, C, R> (this TryOption<A> self, Func<A, B, C, R> func) Source #
Partial application map
method TryOption<R> BiBind <A, R> (this TryOption<A> self, Func<A, TryOption<R>> Some, Func<TryOption<R>> Fail) Source #
method TryOption<R> TriBind <A, R> (this TryOption<A> self, Func<A, TryOption<R>> Some, Func<TryOption<R>> None, Func<Exception, TryOption<R>> Fail) Source #
method Seq<A> AsEnumerable <A> (this TryOption<A> self) Source #
method TryOption<C> SelectMany <A, B, C> ( this TryOption<A> ma, Func<A, TryOption<B>> bind, Func<A, B, C> project) Source #
method TryOption<V> Join <A, U, K, V> ( this TryOption<A> self, TryOption<U> inner, Func<A, K> outerKeyMap, Func<U, K> innerKeyMap, Func<A, U, V> project) Source #
method OptionalResult<T> Try <T> (this TryOption<T> self) Source #
Savely invokes the TryOption computation
type | T | Bound value of the computation |
param | self | TryOption to invoke |
returns | TryOptionResult |
method TryOption<U> Use <T, U> (this TryOption<T> self, Func<T, U> select) Source #
method Task<R> MatchAsync <T, R> (this Task<TryOption<T>> self, Func<T, R> Some, Func<R> None, Func<Exception, R> Fail) Source #
method Task<R> MatchAsync <T, R> (this Task<TryOption<T>> self, Func<T, R> Some, Func<R> Fail) Source #
method Task<R> MatchAsync <T, R> (this Task<TryOption<T>> self, Func<T, Task<R>> Some, Func<R> Fail) Source #
method TryOption<B> Apply <A, B> (this TryOption<Func<A, B>> fab, TryOption<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 TryOption<B> Apply <A, B> (this Func<A, B> fab, TryOption<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 TryOption<C> Apply <A, B, C> (this TryOption<Func<A, B, C>> fabc, TryOption<A> fa, TryOption<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 TryOption<C> Apply <A, B, C> (this Func<A, B, C> fabc, TryOption<A> fa, TryOption<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 TryOption<Func<B, C>> Apply <A, B, C> (this TryOption<Func<A, B, C>> fabc, TryOption<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 TryOption<Func<B, C>> Apply <A, B, C> (this Func<A, B, C> fabc, TryOption<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 TryOption<Func<B, C>> Apply <A, B, C> (this TryOption<Func<A, Func<B, C>>> fabc, TryOption<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 TryOption<B> Action <A, B> (this TryOption<A> fa, TryOption<B> fb) Source #
Evaluate fa, then fb, ignoring the result of fa
param | fa | Applicative to evaluate first |
param | fb | Applicative to evaluate second and then return |
returns | Applicative of type Option |
method TryOption<A> Add <ARITH, A> (this TryOption<A> lhs, TryOption<A> rhs) Source #
Add the bound value of Try(x) to Try(y). If either of the Trys are Fail then the result is Fail
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs + rhs |
method TryOption<A> Subtract <ARITH, A> (this TryOption<A> lhs, TryOption<A> rhs) Source #
Find the subtract of the bound value of Try(x) and Try(y). If either of the Trys are Fail then the result is Fail
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs + rhs |
method TryOption<A> Product <ARITH, A> (this TryOption<A> lhs, TryOption<A> rhs) Source #
Multiply the bound value of Try(x) and Try(y). If either of the Trys are Fail then the result is Fail
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs + rhs |
method TryOption<A> Divide <NUM, A> (this TryOption<A> lhs, TryOption<A> rhs) Source #
Multiply the bound value of Try(x) and Try(y). If either of the Trys are Fail then the result is Fail
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs + rhs |
method A? ToNullable <A> (this TryOption<A> ma) Source #
Convert the Try type to a Nullable of A
type | A | Type of the bound value |
param | ma | Try to convert |
returns | Nullable of A |
method TryOption<T> TryOptionSucc <T> (T value) Source #
TryOption constructor
method TryOption<T> TryOptional <T> (Option<T> value) Source #
TryOption constructor
method TryOption<T> TryOptionFail <T> (Exception ex) Source #
TryOption constructor
method TryOption<A> add <NUM, A> (TryOption<A> lhs, TryOption<A> rhs) Source #
Add the bound value of Try(x) to Try(y). If either of the Trys are Fail then the result is Fail
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs + rhs |
method TryOption<T> subtract <NUM, T> (TryOption<T> lhs, TryOption<T> rhs) Source #
Subtract the Try(x) from Try(y). If either of the Trys throw then the result is Fail For numeric values the behaviour is to find the subtract between the Trys (lhs - rhs) For Lst values the behaviour is to remove items in the rhs from the lhs For Map or Set values the behaviour is to remove items in the rhs from the lhs Otherwise if the R type derives from ISubtractable then the behaviour is to call lhs.Subtract(rhs);
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs - rhs |
method TryOption<T> product <NUM, T> (TryOption<T> lhs, TryOption<T> rhs) Source #
Find the product of Try(x) and Try(y). If either of the Trys throw then the result is Fail For numeric values the behaviour is to multiply the Trys (lhs * rhs) For Lst values the behaviour is to multiply all combinations of values in both lists to produce a new list Otherwise if the R type derives from IMultiplicable then the behaviour is to call lhs.Multiply(rhs);
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs * rhs |
method TryOption<T> divide <NUM, T> (TryOption<T> lhs, TryOption<T> rhs) Source #
Divide Try(x) by Try(y). If either of the Trys throw then the result is Fail For numeric values the behaviour is to divide the Trys (lhs / rhs) For Lst values the behaviour is to divide all combinations of values in both lists to produce a new list Otherwise if the R type derives from IDivisible then the behaviour is to call lhs.Divide(rhs);
param | lhs | Left-hand side of the operation |
param | rhs | Right-hand side of the operation |
returns | lhs / rhs |
method TryOption<B> apply <A, B> (TryOption<Func<A, B>> fab, TryOption<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 TryOption<B> apply <A, B> (Func<A, B> fab, TryOption<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 TryOption<C> apply <A, B, C> (TryOption<Func<A, B, C>> fabc, TryOption<A> fa, TryOption<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 TryOption<C> apply <A, B, C> (Func<A, B, C> fabc, TryOption<A> fa, TryOption<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 TryOption<Func<B, C>> apply <A, B, C> ( TryOption<Func<A, B, C>> fabc, TryOption<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 TryOption<Func<B, C>> apply <A, B, C> (Func<A, B, C> fabc, TryOption<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 TryOption<Func<B, C>> apply <A, B, C> (TryOption<Func<A, Func<B, C>>> fabc, TryOption<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 TryOption<Func<B, C>> apply <A, B, C> (Func<A, Func<B, C>> fabc, TryOption<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 TryOption<B> action <A, B> (TryOption<A> fa, TryOption<B> fb) Source #
Evaluate fa, then fb, ignoring the result of fa
param | fa | Applicative to evaluate first |
param | fb | Applicative to evaluate second and then return |
returns | Applicative of type Option |
method bool isSome <T> (TryOption<T> self) Source #
Test if the Try computation is successful
type | T | Type of the bound value |
param | self | Try computation to test |
returns | True if successful |
method bool isNone <T> (TryOption<T> self) Source #
Test if the Try computation is none
type | T | Type of the bound value |
param | self | Try computation to test |
returns | True if result is a None |
method bool isFail <T> (TryOption<T> self) Source #
Test if the Try computation fails
type | T | Type of the bound value |
param | self | Try computation to test |
returns | True if fails |
method T ifNoneOrFail <T> ( TryOption<T> self, Func<T> None, Func<Exception, T> Fail) Source #
Invoke delegates based on None or Failed stateds
type | T | Bound value type |
param | self | Try computation |
param | None | Delegate to invoke if the result is None |
param | Fail | Delegate to invoke if the result is Fail |
returns | Success value, or the result of the None or Failed delegate |
method Unit ifSome <T> (TryOption<T> self, Action<T> Some) Source #
Invoke a delegate if the Try returns a value successfully
type | T | Type of the bound value |
param | self | Try computation |
param | Some | Delegate to invoke if successful |
method T ifNoneOrFail <T> (TryOption<T> self, Func<T> Fail) Source #
Invoke a delegate if the Try fails
type | T | Type of the bound value |
param | value | Try computation |
param | Fail | Delegate to invoke on failure |
returns | Result of the invocation of Fail on failure, the result of the Try otherwise |
method T ifNoneOrFail <T> (TryOption<T> self, T defaultValue) Source #
Return a default value if the Try fails
type | T | Type of the bound value |
param | self | Try computation |
param | defaultValue | Default value to use on failure |
returns | failValue on failure, the result of the Try otherwise |
method ExceptionMatch<Option<T>> ifFail <T> (TryOption<T> self) Source #
Provides a fluent exception matching interface which is invoked when the Try fails.
type | T | Type of the bound value |
param | self | Try computation |
returns | Fluent exception matcher |
method Unit iffFail <T> (TryOption<T> self, Action<Exception> Fail) Source #
Invoke a delegate if the TryOption fails
type | T | Type of bound value |
param | self | TryOption computation |
param | Fail | Delegate to invoke if the TryOption computation fails |
method TryOption<Exception> failed <T> (TryOption<T> self) Source #
Maps the bound value to the resulting exception (if the Try computation fails). If the Try computation succeeds then a NotSupportedException is used.
type | T | Type of the bound value |
param | self | Try computation |
returns | Try of Exception |
method TryOption<T> flatten <T> (TryOption<TryOption<T>> self) Source #
Flattens nested Try computations
type | T | Type of the bound value |
param | self | Try computation |
returns | Flattened Try computation |
method TryOption<T> flatten <T> (TryOption<TryOption<TryOption<T>>> self) Source #
Flattens nested Try computations
type | T | Type of the bound value |
param | self | Try computation |
returns | Flattened Try computation |
method TryOption<T> flatten <T> (TryOption<TryOption<TryOption<TryOption<T>>>> self) Source #
Flattens nested Try computations
type | T | Type of the bound value |
param | self | Try computation |
returns | Flattened Try computation |
method R match <T, R> (TryOption<T> self, Func<T, R> Some, Func<R> Fail) Source #
Pattern matches the two possible states of the Try computation
type | T | Type of the bound value |
type | R | Type of the resulting bound value |
param | self | Try computation |
param | Some | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
returns | The result of either the Some or Fail delegates |
method R match <T, R> (TryOption<T> self, Func<T, R> Some, Func<R> None, Func<Exception, R> Fail) Source #
Pattern matches the two possible states of the Try computation
type | T | Type of the bound value |
type | R | Type of the resulting bound value |
param | self | Try computation |
param | Some | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
returns | The result of either the Some or Fail delegates |
method R match <T, R> (TryOption<T> self, Func<T, R> Some, R Fail) Source #
Pattern matches the two possible states of the Try computation
type | T | Type of the bound value |
type | R | Type of the resulting bound value |
param | self | Try computation |
param | Some | Delegate to invoke if the Try computation completes successfully |
param | Fail | Default value to use if the Try computation fails |
returns | The result of either the Succ delegate or the Fail value |
method Unit match <T> (TryOption<T> self, Action<T> Some, Action Fail) Source #
Pattern matches the two possible states of the Try computation
type | T | Type of the bound value |
param | self | Try computation |
param | Some | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
method Unit match <T> (TryOption<T> self, Action<T> Some, Action None, Action<Exception> Fail) Source #
Pattern matches the two possible states of the Try computation
type | T | Type of the bound value |
param | self | Try computation |
param | Some | Delegate to invoke if the Try computation completes successfully |
param | Fail | Delegate to invoke if the Try computation fails |
method Unit iter <T> (TryOption<T> self, Action<T> action) Source #
Invokes a delegate with the result of the Try computation if it is successful.
type | T | Type of the bound value |
param | self | Try computation |
param | action | Delegate to invoke on successful invocation of the Try computation |
method S fold <S, T> (TryOption<T> self, S state, Func<S, T, S> folder) Source #
Folds the value of Try into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | self | Try to fold |
param | state | Initial state |
param | folder | Fold function |
returns | Folded state |
method S bifold <S, T> (TryOption<T> self, S state, Func<S, T, S> Some, Func<S, S> Fail) Source #
Folds the result of Try into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | tryDel | Try to fold |
param | state | Initial state |
param | Some | Fold function when Try succeeds |
param | Fail | Fold function when Try fails |
returns | Folded state |
method S trifold <S, T> (TryOption<T> self, S state, Func<S, T, S> Some, Func<S, S> None, Func<S, Exception, S> Fail) Source #
Folds the result of Try into an S. https://en.wikipedia.org/wiki/Fold_(higher-order_function)
param | tryDel | Try to fold |
param | state | Initial state |
param | Some | Fold function when Try succeeds |
param | Fail | Fold function when Try fails |
returns | Folded state |
method bool forall <T> (TryOption<T> self, Func<T, bool> pred) Source #
Tests that a predicate holds for all values of the bound value T
type | T | Type of the bound value |
param | self | Try computation |
param | pred | Predicate to test the bound value against |
returns | True if the predicate holds for the bound value, or if the Try computation fails. False otherwise. |
method int count <T> (TryOption<T> self) Source #
Counts the number of bound values.
type | T | Type of the bound value |
param | self | TrTry computation |
returns | 1 if the Try computation is successful, 0 otherwise. |
method bool exists <T> (TryOption<T> self, Func<T, bool> pred) Source #
Tests that a predicate holds for any value of the bound value T
type | T | Type of the bound value |
param | self | Try computation |
param | pred | Predicate to test the bound value against |
returns | True if the predicate holds for the bound value. False otherwise. |
method TryOption<R> map <T, R> (TryOption<T> self, Func<T, R> mapper) Source #
Maps the bound value
type | T | Type of the bound value |
type | R | Resulting bound value type |
param | self | Try computation |
param | mapper | Delegate to map the bound value |
returns | Mapped Try computation |
method TryOption<R> bimap <T, R> (TryOption<T> tryDel, Func<T, R> Some, Func<R> Fail) Source #
Maps the bound value
type | T | Type of the bound value |
type | R | Resulting bound value type |
param | self | Try computation |
param | Some | Delegate to map the bound value |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped Try computation |
method TryOption<R> trimap <T, R> (TryOption<T> tryDel, Func<T, R> Some, Func<R> None, Func<Exception, R> Fail) Source #
Maps the bound value
type | T | Type of the bound value |
type | R | Resulting bound value type |
param | self | Try computation |
param | Some | Delegate to map the bound value |
param | Fail | Delegate to map the exception to the desired bound result type |
returns | Mapped Try computation |
method TryOption<Func<T2, R>> parmap <T1, T2, R> (TryOption<T1> self, Func<T1, T2, R> func) Source #
Partial application map
method TryOption<Func<T2, Func<T3, R>>> parmap <T1, T2, T3, R> (TryOption<T1> self, Func<T1, T2, T3, R> func) Source #
Partial application map
method TryOption<R> bibind <T, R> (TryOption<T> self, Func<T, TryOption<R>> Some, Func<TryOption<R>> Fail) Source #
method TryOption<R> tribind <T, R> (TryOption<T> self, Func<T, TryOption<R>> Some, Func<TryOption<R>> None, Func<Exception, TryOption<R>> Fail) Source #
struct TryOptionSomeContext <T, R> Source #
struct TryOptionSomeUnitContext <T> Source #
struct TryOptionNoneContext <T, R> Source #