- FoldableExtensions
- FoldMaybe <T, A, S> ( this K<T, A> ta, S initialState, Func<S, Func<A, Option<S>>> f)
- FoldMaybe <T, A, S> ( this K<T, A> ta, S initialState, Func<S, A, Option<S>> f)
- FoldBackMaybe <T, A, S> ( this K<T, A> ta, S initialState, Func<A, Func<S, Option<S>>> f)
- FoldBackMaybe <T, A, S> ( this K<T, A> ta, S initialState, Func<S, A, Option<S>> f)
- FoldWhile <T, A, S> ( this K<T, A> ta, S initialState, Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate)
- FoldWhile <T, A, S> ( this K<T, A> ta, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate)
- FoldBackWhile <T, A, S> ( this K<T, A> ta, S initialState, Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate)
- FoldBackWhile <T, A, S> ( this K<T, A> ta, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate)
- FoldWhileM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate)
- FoldWhileM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, A, K<M, S>> f, Func<A, bool> predicate)
- FoldBackWhileM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate)
- FoldBackWhileM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, A, K<M, S>> f, Func<A, bool> predicate)
- FoldUntil <T, A, S> ( this K<T, A> ta, S initialState, Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate)
- FoldUntil <T, A, S> ( this K<T, A> ta, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate)
- FoldUntilM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate)
- FoldUntilM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, A, K<M, S>> f, Func<A, bool> predicate)
- FoldBackUntil <T, A, S> ( this K<T, A> ta, S initialState, Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate)
- FoldBackUntil <T, A, S> ( this K<T, A> ta, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate)
- FoldBackUntilM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate)
- FoldBackUntilM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, A, K<M, S>> f, Func<A, bool> predicate)
- Fold <T, A, S> ( this K<T, A> ta, S initialState, Func<A, Func<S, S>> f)
- Fold <T, A, S> (this K<T, A> ta, S initialState, Func<S, A, S> f)
- FoldM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<A, Func<S, K<M, S>>> f)
- FoldM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, A, K<M, S>> f)
- FoldBack <T, A, S> (this K<T, A> ta, S initialState, Func<S, Func<A, S>> f)
- FoldBack <T, A, S> (this K<T, A> ta, S initialState, Func<S, A, S> f)
- FoldBackM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, Func<A, K<M, S>>> f)
- FoldBackM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, A, K<M, S>> f)
- Fold <T, A> (this K<T, A> tm)
- FoldWhile <T, A> (this K<T, A> tm, Func<(A State, A Value), bool> predicate)
- FoldUntil <T, A> (this K<T, A> tm, Func<(A State, A Value), bool> predicate)
- FoldMap <T, A, B> (this K<T, A> ta, Func<A, B> f)
- FoldMapWhile <T, A, B> (this K<T, A> ta, Func<A, B> f, Func<(B State, A Value), bool> predicate)
- FoldMapUntil <T, A, B> (this K<T, A> ta, Func<A, B> f, Func<(B State, A Value), bool> predicate)
- FoldMapBack <T, A, B> (this K<T, A> ta, Func<A, B> f)
- FoldMapBackWhile <T, A, B> (this K<T, A> ta, Func<A, B> f, Func<(B State, A Value), bool> predicate)
- FoldMapBackUntil <T, A, B> (this K<T, A> ta, Func<A, B> f, Func<(B State, A Value), bool> predicate)
- ToSeq <T, A> (this K<T, A> ta)
- ToLst <T, A> (this K<T, A> ta)
- ToArr <T, A> (this K<T, A> ta)
- ToIterable <T, A> (this K<T, A> ta)
- IsEmpty <T, A> (this K<T, A> ta)
- Count <T, A> (this K<T, A> ta)
- Exists <T, A> (this K<T, A> ta, Func<A, bool> predicate)
- ForAll <T, A> (this K<T, A> ta, Func<A, bool> predicate)
- Contains <EqA, T, A> (this K<T, A> ta, A value)
- Contains <T, A> (this K<T, A> ta, A value)
- Find <T, A> (this K<T, A> ta, Func<A, bool> predicate)
- FindBack <T, A> (this K<T, A> ta, Func<A, bool> predicate)
- FindAll <T, A> (this K<T, A> ta, Func<A, bool> predicate)
- FindAllBack <T, A> (this K<T, A> ta, Func<A, bool> predicate)
- Sum <T, A> (this K<T, A> ta)
- Product <T, A> (this K<T, A> ta)
- Head <T, A> (this K<T, A> ta)
- Last <T, A> (this K<T, A> ta)
- Iter <T, A, F, B> (this K<T, A> ta, Func<A, K<F, B>> f)
- Iter <T, A> (this K<T, A> ta, Action<A> f)
- Iter <T, A> (this K<T, A> ta, Action<int, A> f)
- Min <OrdA, T, A> (this K<T, A> ta)
- Min <T, A> (this K<T, A> ta)
- Max <OrdA, T, A> (this K<T, A> ta)
- Max <T, A> (this K<T, A> ta)
- Min <OrdA, T, A> (this K<T, A> ta, A initialMin)
- Min <T, A> (this K<T, A> ta, A initialMin)
- Max <OrdA, T, A> (this K<T, A> ta, A initialMax)
- Max <T, A> (this K<T, A> ta, A initialMax)
- Average <T, A> (this K<T, A> ta)
- Average <T, A, B> (this K<T, A> ta, Func<A, B> f)
- At <T, A> (this K<T, A> ta, Index index)
- Partition <T, A> (this K<T, A> ta, Func<A, bool> f)
- FoldableExtensions
- FoldWhileT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate)
- FoldWhileT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate)
- FoldBackWhileT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate)
- FoldBackWhileT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate)
- FoldUntilT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate)
- FoldUntilT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate)
- FoldBackUntilT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate)
- FoldBackUntilT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate)
- FoldT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<A, Func<S, S>> f)
- FoldT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, A, S> f)
- FoldBackT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, Func<A, S>> f)
- FoldBackT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, A, S> f)
- FoldT <T, U, A> (this K<T, K<U, A>> tua)
- FoldWhileT <T, U, A> (this K<T, K<U, A>> tua, Func<(A State, A Value), bool> predicate)
- FoldUntilT <T, U, A> (this K<T, K<U, A>> tua, Func<(A State, A Value), bool> predicate)
- FoldMapT <T, U, A, B> (this K<T, K<U, A>> tua, Func<A, B> f)
- FoldMapWhileT <T, U, A, B> (this K<T, K<U, A>> tua, Func<A, B> f, Func<(B State, A Value), bool> predicate)
- FoldMapUntilT <T, U, A, B> (this K<T, K<U, A>> tua, Func<A, B> f, Func<(B State, A Value), bool> predicate)
- FoldMapBackT <T, U, A, B> (this K<T, K<U, A>> tua, Func<A, B> f)
- FoldMapBackWhileT <T, U, A, B> (this K<T, K<U, A>> tua, Func<A, B> f, Func<(B State, A Value), bool> predicate)
- FoldMapBackUntilT <T, U, A, B> (this K<T, K<U, A>> tua, Func<A, B> f, Func<(B State, A Value), bool> predicate)
- ToSeqT <T, U, A> (this K<T, K<U, A>> tua)
- ToLstT <T, U, A> (this K<T, K<U, A>> tua)
- ToArrT <T, U, A> (this K<T, K<U, A>> tua)
- ToEnumerableT <T, U, A> (this K<T, K<U, A>> tua)
- IsEmptyT <T, U, A> (this K<T, K<U, A>> tua)
- CountT <T, U, A> (this K<T, K<U, A>> tua)
- ExistsT <T, U, A> (this K<T, K<U, A>> tua, Func<A, bool> predicate)
- ForAllT <T, U, A> (this K<T, K<U, A>> tua, Func<A, bool> predicate)
- ContainsT <EqA, T, U, A> (this K<T, K<U, A>> tua, A value)
- ContainsT <T, U, A> (this K<T, K<U, A>> tua, A value)
- FindT <T, U, A> (this K<T, K<U, A>> tua, Func<A, bool> predicate)
- FindBackT <T, U, A> (this K<T, K<U, A>> tua, Func<A, bool> predicate)
- FindAllT <T, U, A> (this K<T, K<U, A>> tua, Func<A, bool> predicate)
- FindAllBackT <T, U, A> (this K<T, K<U, A>> tua, Func<A, bool> predicate)
- SumT <T, U, A> (this K<T, K<U, A>> tua)
- ProductT <T, U, A> (this K<T, K<U, A>> tua)
- HeadT <T, U, A> (this K<T, K<U, A>> tua)
- LastT <T, U, A> (this K<T, K<U, A>> tua)
- IterT <T, U, A, F, B> (this K<T, K<U, A>> tua, Func<A, K<F, B>> f)
- IterT <T, U, A> (this K<T, K<U, A>> tua, Action<int, A> f)
- IterT <T, U, A> (this K<T, K<U, A>> tua, Action<A> f)
- MinT <OrdA, T, U, A> (this K<T, K<U, A>> tua)
- MinT <T, U, A> (this K<T, K<U, A>> tua)
- MaxT <OrdA, T, U, A> (this K<T, K<U, A>> tua)
- MaxT <T, U, A> (this K<T, K<U, A>> tua)
- MinT <OrdA, T, U, A> (this K<T, K<U, A>> tua, A initialMin)
- MinT <T, U, A> (this K<T, K<U, A>> tua, A initialMin)
- MaxT <OrdA, T, U, A> (this K<T, K<U, A>> tua, A initialMax)
- MaxT <T, U, A> (this K<T, K<U, A>> tua, A initialMax)
- AverageT <T, A> (this K<T, A> ta)
- AverageT <T, A, B> (this K<T, A> ta, Func<A, B> f)
- AtT <T, A> (this K<T, A> ta, Index index)
- Foldable
- foldWhile <T, A, S> ( Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldWhile <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldBackWhile <T, A, S> ( Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldBackWhile <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldWhileM <T, A, M, S> ( Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- foldWhileM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- foldBackWhileM <T, A, M, S> ( Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- foldBackWhileM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- foldUntil <T, A, S> ( Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldUntil <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldUntilM <T, A, M, S> ( Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- foldUntilM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- foldBackUntil <T, A, S> ( Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldBackUntil <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldBackUntilM <T, A, M, S> ( Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- foldBackUntilM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- fold <T, A, S> (Func<A, Func<S, S>> f, S initialState, K<T, A> ta)
- fold <T, A, S> (Func<S, A, S> f, S initialState, K<T, A> ta)
- foldM <T, A, M, S> ( Func<A, Func<S, K<M, S>>> f, S initialState, K<T, A> ta)
- foldM <T, A, M, S> ( Func<S, A, K<M, S>> f, S initialState, K<T, A> ta)
- foldBack <T, A, S> (Func<S, Func<A, S>> f, S initialState, K<T, A> ta)
- foldBack <T, A, S> (Func<S, A, S> f, S initialState, K<T, A> ta)
- foldBackM <T, A, M, S> ( Func<S, Func<A, K<M, S>>> f, S initialState, K<T, A> ta)
- foldBackM <T, A, M, S> ( Func<S, A, K<M, S>> f, S initialState, K<T, A> ta)
- fold <T, A> (K<T, A> tm)
- foldWhile <T, A> (Func<(A State, A Value), bool> predicate, K<T, A> tm)
- foldUntil <T, A> (Func<(A State, A Value), bool> predicate, K<T, A> tm)
- foldMap <T, A, B> (Func<A, B> f, K<T, A> ta)
- foldMapWhile <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta)
- foldMapUntil <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta)
- foldMapBack <T, A, B> (Func<A, B> f, K<T, A> ta)
- foldMapBackWhile <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta)
- foldMapBackUntil <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta)
- toSeq <T, A> (K<T, A> ta)
- toLst <T, A> (K<T, A> ta)
- toArr <T, A> (K<T, A> ta)
- toIterable <T, A> (K<T, A> ta)
- isEmpty <T, A> (K<T, A> ta)
- count <T, A> (K<T, A> ta)
- exists <T, A> (Func<A, bool> predicate, K<T, A> ta)
- forAll <T, A> (Func<A, bool> predicate, K<T, A> ta)
- contains <EqA, T, A> (A value, K<T, A> ta)
- contains <T, A> (A value, K<T, A> ta)
- find <T, A> (Func<A, bool> predicate, K<T, A> ta)
- findBack <T, A> (Func<A, bool> predicate, K<T, A> ta)
- findAll <T, A> (Func<A, bool> predicate, K<T, A> ta)
- findAllBack <T, A> (Func<A, bool> predicate, K<T, A> ta)
- sum <T, A> (K<T, A> ta)
- product <T, A> (K<T, A> ta)
- head <T, A> (K<T, A> ta)
- last <T, A> (K<T, A> ta)
- iter <T, A, F, B> (Func<A, K<F, B>> f, K<T, A> ta)
- iter <T, A> (Action<int, A> f, K<T, A> ta)
- iter <T, A> (Action<A> f, K<T, A> ta)
- min <OrdA, T, A> (K<T, A> ta)
- min <T, A> (K<T, A> ta)
- max <OrdA, T, A> (K<T, A> ta)
- max <T, A> (K<T, A> ta)
- min <OrdA, T, A> (K<T, A> ta, A initialMin)
- min <T, A> (K<T, A> ta, A initialMin)
- max <OrdA, T, A> (K<T, A> ta, A initialMax)
- max <T, A> (K<T, A> ta, A initialMax)
- average <T, A> (K<T, A> ta)
- average <T, A, B> (Func<A, B> f, K<T, A> ta)
- at <T, A> (K<T, A> ta, Index index)
- partition <T, A> (Func<A, bool> f, K<T, A> ta)
- Prelude
- foldWhile <T, A, S> ( Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldWhile <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldBackWhile <T, A, S> ( Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldBackWhile <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldWhileM <T, A, M, S> ( Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- foldWhileM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- foldBackWhileM <T, A, M, S> ( Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- foldBackWhileM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- foldUntil <T, A, S> ( Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldUntil <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldUntilM <T, A, M, S> ( Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- foldUntilM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- foldBackUntil <T, A, S> ( Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldBackUntil <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- foldBackUntilM <T, A, M, S> ( Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- foldBackUntilM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- fold <T, A, S> (Func<A, Func<S, S>> f, S initialState, K<T, A> ta)
- fold <T, A, S> (Func<S, A, S> f, S initialState, K<T, A> ta)
- foldM <T, A, M, S> ( Func<A, Func<S, K<M, S>>> f, S initialState, K<T, A> ta)
- foldM <T, A, M, S> ( Func<S, A, K<M, S>> f, S initialState, K<T, A> ta)
- foldBack <T, A, S> (Func<S, Func<A, S>> f, S initialState, K<T, A> ta)
- foldBack <T, A, S> (Func<S, A, S> f, S initialState, K<T, A> ta)
- foldBackM <T, A, M, S> ( Func<S, Func<A, K<M, S>>> f, S initialState, K<T, A> ta)
- foldBackM <T, A, M, S> ( Func<S, A, K<M, S>> f, S initialState, K<T, A> ta)
- fold <T, A> (K<T, A> tm)
- foldWhile <T, A> (Func<(A State, A Value), bool> predicate, K<T, A> tm)
- foldUntil <T, A> (Func<(A State, A Value), bool> predicate, K<T, A> tm)
- foldMap <T, A, B> (Func<A, B> f, K<T, A> ta)
- foldMapWhile <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta)
- foldMapUntil <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta)
- foldMapBack <T, A, B> (Func<A, B> f, K<T, A> ta)
- foldMapBackWhile <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta)
- foldMapBackUntil <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta)
- iter <T, A, F, B> (Func<A, K<F, B>> f, K<T, A> ta)
- iter <T, A> (Action<int, A> f, K<T, A> ta)
- iter <T, A> (Action<A> f, K<T, A> ta)
- partition <T, A> (Func<A, bool> f, K<T, A> ta)
- Foldable <out T>
- FoldWhile <A, S> ( Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- FoldBackWhile <A, S> ( Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- FoldMaybe <A, S> ( Func<S, Func<A, Option<S>>> f, S initialState, K<T, A> ta)
- FoldBackMaybe <A, S> ( Func<A, Func<S, Option<S>>> f, S initialState, K<T, A> ta)
- FoldWhileM <A, M, S> ( Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- FoldBackWhileM <A, M, S> ( Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- FoldUntil <A, S> ( Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- FoldUntilM <A, M, S> ( Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- FoldBackUntil <A, S> ( Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta)
- FoldBackUntilM <A, M, S> ( Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta)
- Fold <A, S> (Func<A, Func<S, S>> f, S initialState, K<T, A> ta)
- FoldM <A, M, S> ( Func<A, Func<S, K<M, S>>> f, S initialState, K<T, A> ta)
- FoldBack <A, S> (Func<S, Func<A, S>> f, S initialState, K<T, A> ta)
- FoldBackM <A, M, S> ( Func<S, Func<A, K<M, S>>> f, S initialState, K<T, A> ta)
- Fold <A> (K<T, A> tm)
- FoldWhile <A> (Func<(A State, A Value), bool> predicate, K<T, A> tm)
- FoldUntil <A> (Func<(A State, A Value), bool> predicate, K<T, A> tm)
- FoldMap <A, B> (Func<A, B> f, K<T, A> ta)
- FoldMapWhile <A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta)
- FoldMapUntil <A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta)
- FoldMapBack <A, B> (Func<A, B> f, K<T, A> ta)
- FoldMapBackWhile <A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta)
- FoldMapBackUntil <A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta)
- ToSeq <A> (K<T, A> ta)
- ToLst <A> (K<T, A> ta)
- ToArr <A> (K<T, A> ta)
- ToIterable <A> (K<T, A> ta)
- IsEmpty <A> (K<T, A> ta)
- Count <A> (K<T, A> ta)
- Exists <A> (Func<A, bool> predicate, K<T, A> ta)
- ForAll <A> (Func<A, bool> predicate, K<T, A> ta)
- Contains <EqA, A> (A value, K<T, A> ta)
- Contains <A> (A value, K<T, A> ta)
- Find <A> (Func<A, bool> predicate, K<T, A> ta)
- FindBack <A> (Func<A, bool> predicate, K<T, A> ta)
- FindAll <A> (Func<A, bool> predicate, K<T, A> ta)
- FindAllBack <A> (Func<A, bool> predicate, K<T, A> ta)
- Sum <A> (K<T, A> ta)
- Product <A> (K<T, A> ta)
- Head <A> (K<T, A> ta)
- Last <A> (K<T, A> ta)
- Iter <A, F, B> (Func<A, K<F, B>> f, K<T, A> ta)
- Iter <A> (Action<A> f, K<T, A> ta)
- Iter <A> (Action<int, A> f, K<T, A> ta)
- Min <OrdA, A> (K<T, A> ta)
- Min <A> (K<T, A> ta)
- Max <OrdA, A> (K<T, A> ta)
- Max <A> (K<T, A> ta)
- Min <OrdA, A> (K<T, A> ta, A initialMin)
- Min <A> (K<T, A> ta, A initialMin)
- Max <OrdA, A> (K<T, A> ta, A initialMax)
- Max <A> (K<T, A> ta, A initialMax)
- Average <A> (K<T, A> ta)
- Average <A, B> (Func<A, B> f, K<T, A> ta)
- At <A> (K<T, A> ta, Index index)
- Partition <A> (Func<A, bool> f, K<T, A> ta)
class FoldableExtensions Source #
method S FoldMaybe <T, A, S> ( this K<T, A> ta, S initialState, Func<S, Func<A, Option<S>>> f) Source #
Fold until the Option
returns None
type | A | Value type |
type | S | State type |
param | f | Fold function |
param | initialState | Initial state for the fold |
param | ta | Foldable structure |
returns | Aggregated value |
method S FoldMaybe <T, A, S> ( this K<T, A> ta, S initialState, Func<S, A, Option<S>> f) Source #
Fold until the Option
returns None
type | A | Value type |
type | S | State type |
param | f | Fold function |
param | initialState | Initial state for the fold |
param | ta | Foldable structure |
returns | Aggregated value |
method S FoldBackMaybe <T, A, S> ( this K<T, A> ta, S initialState, Func<A, Func<S, Option<S>>> f) Source #
Fold until the Option
returns None
type | A | Value type |
type | S | State type |
param | f | Fold function |
param | initialState | Initial state for the fold |
param | ta | Foldable structure |
returns | Aggregated value |
method S FoldBackMaybe <T, A, S> ( this K<T, A> ta, S initialState, Func<S, A, Option<S>> f) Source #
Fold until the Option
returns None
type | A | Value type |
type | S | State type |
param | f | Fold function |
param | initialState | Initial state for the fold |
param | ta | Foldable structure |
returns | Aggregated value |
method S FoldWhile <T, A, S> ( this K<T, A> ta, S initialState, Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldWhile <T, A, S> ( this K<T, A> ta, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldBackWhile <T, A, S> ( this K<T, A> ta, S initialState, Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldBackWhile <T, A, S> ( this K<T, A> ta, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method K<M, S> FoldWhileM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate) Source #
Same behaviour as Fold
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> FoldWhileM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, A, K<M, S>> f, Func<A, bool> predicate) Source #
Same behaviour as Fold
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> FoldBackWhileM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate) Source #
Same behaviour as FoldBack
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> FoldBackWhileM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, A, K<M, S>> f, Func<A, bool> predicate) Source #
Same behaviour as FoldBack
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method S FoldUntil <T, A, S> ( this K<T, A> ta, S initialState, Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldUntil <T, A, S> ( this K<T, A> ta, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method K<M, S> FoldUntilM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate) Source #
Same behaviour as Fold
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> FoldUntilM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, A, K<M, S>> f, Func<A, bool> predicate) Source #
Same behaviour as Fold
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method S FoldBackUntil <T, A, S> ( this K<T, A> ta, S initialState, Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldBackUntil <T, A, S> ( this K<T, A> ta, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method K<M, S> FoldBackUntilM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate) Source #
Same behaviour as FoldBack
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> FoldBackUntilM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, A, K<M, S>> f, Func<A, bool> predicate) Source #
Same behaviour as FoldBack
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method S Fold <T, A, S> ( this K<T, A> ta, S initialState, Func<A, Func<S, S>> f) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method S Fold <T, A, S> (this K<T, A> ta, S initialState, Func<S, A, S> f) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method K<M, S> FoldM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<A, Func<S, K<M, S>>> f) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method K<M, S> FoldM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, A, K<M, S>> f) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method S FoldBack <T, A, S> (this K<T, A> ta, S initialState, Func<S, Func<A, S>> f) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method S FoldBack <T, A, S> (this K<T, A> ta, S initialState, Func<S, A, S> f) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method K<M, S> FoldBackM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, Func<A, K<M, S>>> f) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method K<M, S> FoldBackM <T, A, M, S> ( this K<T, A> ta, S initialState, Func<S, A, K<M, S>> f) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method A Fold <T, A> (this K<T, A> tm) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method A FoldWhile <T, A> (this K<T, A> tm, Func<(A State, A Value), bool> predicate) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method A FoldUntil <T, A> (this K<T, A> tm, Func<(A State, A Value), bool> predicate) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method B FoldMap <T, A, B> (this K<T, A> ta, Func<A, B> f) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B FoldMapWhile <T, A, B> (this K<T, A> ta, Func<A, B> f, Func<(B State, A Value), bool> predicate) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B FoldMapUntil <T, A, B> (this K<T, A> ta, Func<A, B> f, Func<(B State, A Value), bool> predicate) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B FoldMapBack <T, A, B> (this K<T, A> ta, Func<A, B> f) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method B FoldMapBackWhile <T, A, B> (this K<T, A> ta, Func<A, B> f, Func<(B State, A Value), bool> predicate) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method B FoldMapBackUntil <T, A, B> (this K<T, A> ta, Func<A, B> f, Func<(B State, A Value), bool> predicate) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method Seq<A> ToSeq <T, A> (this K<T, A> ta) Source #
List of elements of a structure, from left to right
method Lst<A> ToLst <T, A> (this K<T, A> ta) Source #
List of elements of a structure, from left to right
method Arr<A> ToArr <T, A> (this K<T, A> ta) Source #
List of elements of a structure, from left to right
method Iterable<A> ToIterable <T, A> (this K<T, A> ta) Source #
List of elements of a structure, from left to right
method bool IsEmpty <T, A> (this K<T, A> ta) Source #
List of elements of a structure, from left to right
method int Count <T, A> (this K<T, A> ta) Source #
Returns the size/length of a finite structure as an int
. The
default implementation just counts elements starting with the leftmost.
Instances for structures that can compute the element count faster than via element-by-element counting, should provide a specialised implementation.
method bool Exists <T, A> (this K<T, A> ta, Func<A, bool> predicate) Source #
Does an element that fits the predicate occur in the structure?
method bool ForAll <T, A> (this K<T, A> ta, Func<A, bool> predicate) Source #
Does the predicate hold for all elements in the structure?
method bool Contains <EqA, T, A> (this K<T, A> ta, A value) Source #
Does the element exist in the structure?
method bool Contains <T, A> (this K<T, A> ta, A value) Source #
Does the element exist in the structure?
method Option<A> Find <T, A> (this K<T, A> ta, Func<A, bool> predicate) Source #
Find the first element that match the predicate
method Option<A> FindBack <T, A> (this K<T, A> ta, Func<A, bool> predicate) Source #
Find the last element that match the predicate
method Seq<A> FindAll <T, A> (this K<T, A> ta, Func<A, bool> predicate) Source #
Find the elements that match the predicate
method Seq<A> FindAllBack <T, A> (this K<T, A> ta, Func<A, bool> predicate) Source #
Find the elements that match the predicate
method A Sum <T, A> (this K<T, A> ta) Source #
Computes the sum of the numbers of a structure.
method A Product <T, A> (this K<T, A> ta) Source #
Computes the product of the numbers of a structure.
method Option<A> Head <T, A> (this K<T, A> ta) Source #
Get the head item in the foldable or None
method Option<A> Last <T, A> (this K<T, A> ta) Source #
Get the head item in the foldable or None
method K<F, Unit> Iter <T, A, F, B> (this K<T, A> ta, Func<A, K<F, B>> f) Source #
Map each element of a structure to an 'Applicative' action, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results see Traversable.traverse
.
method Unit Iter <T, A> (this K<T, A> ta, Action<A> f) Source #
Map each element of a structure to an action, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results see Traversable.traverse
.
method Unit Iter <T, A> (this K<T, A> ta, Action<int, A> f) Source #
Map each element of a structure to an action, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results see Traversable.traverse
.
method Option<A> Min <OrdA, T, A> (this K<T, A> ta) Source #
Find the minimum value in the structure
method Option<A> Min <T, A> (this K<T, A> ta) Source #
Find the minimum value in the structure
method Option<A> Max <OrdA, T, A> (this K<T, A> ta) Source #
Find the maximum value in the structure
method Option<A> Max <T, A> (this K<T, A> ta) Source #
Find the maximum value in the structure
method A Min <OrdA, T, A> (this K<T, A> ta, A initialMin) Source #
Find the minimum value in the structure
method A Min <T, A> (this K<T, A> ta, A initialMin) Source #
Find the minimum value in the structure
method A Max <OrdA, T, A> (this K<T, A> ta, A initialMax) Source #
Find the maximum value in the structure
method A Max <T, A> (this K<T, A> ta, A initialMax) Source #
Find the maximum value in the structure
method A Average <T, A> (this K<T, A> ta) Source #
Find the average of all the values in the structure
method B Average <T, A, B> (this K<T, A> ta, Func<A, B> f) Source #
Find the average of all the values in the structure
class FoldableExtensions Source #
method S FoldWhileT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldWhileT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldBackWhileT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldBackWhileT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldUntilT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldUntilT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldBackUntilT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldBackUntilT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, A, S> f, Func<(S State, A Value), bool> predicate) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<A, Func<S, S>> f) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method S FoldT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, A, S> f) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method S FoldBackT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, Func<A, S>> f) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method S FoldBackT <T, U, A, S> ( this K<T, K<U, A>> tua, S initialState, Func<S, A, S> f) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method A FoldT <T, U, A> (this K<T, K<U, A>> tua) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method A FoldWhileT <T, U, A> (this K<T, K<U, A>> tua, Func<(A State, A Value), bool> predicate) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method A FoldUntilT <T, U, A> (this K<T, K<U, A>> tua, Func<(A State, A Value), bool> predicate) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method B FoldMapT <T, U, A, B> (this K<T, K<U, A>> tua, Func<A, B> f) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B FoldMapWhileT <T, U, A, B> (this K<T, K<U, A>> tua, Func<A, B> f, Func<(B State, A Value), bool> predicate) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B FoldMapUntilT <T, U, A, B> (this K<T, K<U, A>> tua, Func<A, B> f, Func<(B State, A Value), bool> predicate) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B FoldMapBackT <T, U, A, B> (this K<T, K<U, A>> tua, Func<A, B> f) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method B FoldMapBackWhileT <T, U, A, B> (this K<T, K<U, A>> tua, Func<A, B> f, Func<(B State, A Value), bool> predicate) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method B FoldMapBackUntilT <T, U, A, B> (this K<T, K<U, A>> tua, Func<A, B> f, Func<(B State, A Value), bool> predicate) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method Seq<A> ToSeqT <T, U, A> (this K<T, K<U, A>> tua) Source #
List of elements of a structure, from left to right
method Lst<A> ToLstT <T, U, A> (this K<T, K<U, A>> tua) Source #
List of elements of a structure, from left to right
method Arr<A> ToArrT <T, U, A> (this K<T, K<U, A>> tua) Source #
List of elements of a structure, from left to right
method Iterable<A> ToEnumerableT <T, U, A> (this K<T, K<U, A>> tua) Source #
List of elements of a structure, from left to right
method bool IsEmptyT <T, U, A> (this K<T, K<U, A>> tua) Source #
List of elements of a structure, from left to right
method int CountT <T, U, A> (this K<T, K<U, A>> tua) Source #
Returns the size/length of a finite structure as an int
. The
default implementation just counts elements starting with the leftmost.
Instances for structures that can compute the element count faster than via element-by-element counting, should provide a specialised implementation.
method bool ExistsT <T, U, A> (this K<T, K<U, A>> tua, Func<A, bool> predicate) Source #
Does an element that fits the predicate occur in the structure?
method bool ForAllT <T, U, A> (this K<T, K<U, A>> tua, Func<A, bool> predicate) Source #
Does the predicate hold for all elements in the structure?
method bool ContainsT <EqA, T, U, A> (this K<T, K<U, A>> tua, A value) Source #
Does the element exist in the structure?
method bool ContainsT <T, U, A> (this K<T, K<U, A>> tua, A value) Source #
Does the element exist in the structure?
method Option<A> FindT <T, U, A> (this K<T, K<U, A>> tua, Func<A, bool> predicate) Source #
Find the first element that match the predicate
method Option<A> FindBackT <T, U, A> (this K<T, K<U, A>> tua, Func<A, bool> predicate) Source #
Find the last element that match the predicate
method Seq<A> FindAllT <T, U, A> (this K<T, K<U, A>> tua, Func<A, bool> predicate) Source #
Find the the elements that match the predicate
method Seq<A> FindAllBackT <T, U, A> (this K<T, K<U, A>> tua, Func<A, bool> predicate) Source #
Find the the elements that match the predicate
method A SumT <T, U, A> (this K<T, K<U, A>> tua) Source #
Computes the sum of the numbers of a structure.
method A ProductT <T, U, A> (this K<T, K<U, A>> tua) Source #
Computes the product of the numbers of a structure.
method Option<A> HeadT <T, U, A> (this K<T, K<U, A>> tua) Source #
Get the head item in the foldable or None
method Option<A> LastT <T, U, A> (this K<T, K<U, A>> tua) Source #
Get the head item in the foldable or None
method K<F, Unit> IterT <T, U, A, F, B> (this K<T, K<U, A>> tua, Func<A, K<F, B>> f) Source #
Map each element of a structure to an 'Applicative' action, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results see Traversable.traverse
.
method Unit IterT <T, U, A> (this K<T, K<U, A>> tua, Action<int, A> f) Source #
Map each element of a structure to an action, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results see Traversable.traverse
.
method Unit IterT <T, U, A> (this K<T, K<U, A>> tua, Action<A> f) Source #
Map each element of a structure to an action, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results see Traversable.traverse
.
method Option<A> MinT <OrdA, T, U, A> (this K<T, K<U, A>> tua) Source #
Find the minimum value in the structure
method Option<A> MinT <T, U, A> (this K<T, K<U, A>> tua) Source #
Find the minimum value in the structure
method Option<A> MaxT <OrdA, T, U, A> (this K<T, K<U, A>> tua) Source #
Find the maximum value in the structure
method Option<A> MaxT <T, U, A> (this K<T, K<U, A>> tua) Source #
Find the maximum value in the structure
method A MinT <OrdA, T, U, A> (this K<T, K<U, A>> tua, A initialMin) Source #
Find the minimum value in the structure
method A MinT <T, U, A> (this K<T, K<U, A>> tua, A initialMin) Source #
Find the minimum value in the structure
method A MaxT <OrdA, T, U, A> (this K<T, K<U, A>> tua, A initialMax) Source #
Find the maximum value in the structure
method A MaxT <T, U, A> (this K<T, K<U, A>> tua, A initialMax) Source #
Find the maximum value in the structure
method A AverageT <T, A> (this K<T, A> ta) Source #
Find the average of all the values in the structure
method S foldWhile <T, A, S> ( Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S foldWhile <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S foldBackWhile <T, A, S> ( Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S foldBackWhile <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method K<M, S> foldWhileM <T, A, M, S> ( Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> foldWhileM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> foldBackWhileM <T, A, M, S> ( Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> foldBackWhileM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method S foldUntil <T, A, S> ( Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S foldUntil <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method K<M, S> foldUntilM <T, A, M, S> ( Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> foldUntilM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method S foldBackUntil <T, A, S> ( Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S foldBackUntil <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method K<M, S> foldBackUntilM <T, A, M, S> ( Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> foldBackUntilM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method S fold <T, A, S> (Func<A, Func<S, S>> f, S initialState, K<T, A> ta) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method S fold <T, A, S> (Func<S, A, S> f, S initialState, K<T, A> ta) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method K<M, S> foldM <T, A, M, S> ( Func<A, Func<S, K<M, S>>> f, S initialState, K<T, A> ta) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method K<M, S> foldM <T, A, M, S> ( Func<S, A, K<M, S>> f, S initialState, K<T, A> ta) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method S foldBack <T, A, S> (Func<S, Func<A, S>> f, S initialState, K<T, A> ta) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method S foldBack <T, A, S> (Func<S, A, S> f, S initialState, K<T, A> ta) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method K<M, S> foldBackM <T, A, M, S> ( Func<S, Func<A, K<M, S>>> f, S initialState, K<T, A> ta) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method K<M, S> foldBackM <T, A, M, S> ( Func<S, A, K<M, S>> f, S initialState, K<T, A> ta) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method A fold <T, A> (K<T, A> tm) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method A foldWhile <T, A> (Func<(A State, A Value), bool> predicate, K<T, A> tm) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method A foldUntil <T, A> (Func<(A State, A Value), bool> predicate, K<T, A> tm) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method B foldMap <T, A, B> (Func<A, B> f, K<T, A> ta) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B foldMapWhile <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B foldMapUntil <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B foldMapBack <T, A, B> (Func<A, B> f, K<T, A> ta) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method B foldMapBackWhile <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method B foldMapBackUntil <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method Seq<A> toSeq <T, A> (K<T, A> ta) Source #
List of elements of a structure, from left to right
method Lst<A> toLst <T, A> (K<T, A> ta) Source #
List of elements of a structure, from left to right
method Arr<A> toArr <T, A> (K<T, A> ta) Source #
List of elements of a structure, from left to right
method Iterable<A> toIterable <T, A> (K<T, A> ta) Source #
List of elements of a structure, from left to right
method bool isEmpty <T, A> (K<T, A> ta) Source #
List of elements of a structure, from left to right
method int count <T, A> (K<T, A> ta) Source #
Returns the size/length of a finite structure as an int
. The
default implementation just counts elements starting with the leftmost.
Instances for structures that can compute the element count faster than via element-by-element counting, should provide a specialised implementation.
method bool exists <T, A> (Func<A, bool> predicate, K<T, A> ta) Source #
Does an element that fits the predicate occur in the structure?
method bool forAll <T, A> (Func<A, bool> predicate, K<T, A> ta) Source #
Does the predicate hold for all elements in the structure?
method bool contains <EqA, T, A> (A value, K<T, A> ta) Source #
Does the element exist in the structure?
method bool contains <T, A> (A value, K<T, A> ta) Source #
Does the element exist in the structure?
method Option<A> find <T, A> (Func<A, bool> predicate, K<T, A> ta) Source #
Find the first element that match the predicate
method Option<A> findBack <T, A> (Func<A, bool> predicate, K<T, A> ta) Source #
Find the last element that match the predicate
method Seq<A> findAll <T, A> (Func<A, bool> predicate, K<T, A> ta) Source #
Find the elements that match the predicate
method Seq<A> findAllBack <T, A> (Func<A, bool> predicate, K<T, A> ta) Source #
Find the elements that match the predicate
method A sum <T, A> (K<T, A> ta) Source #
Computes the sum of the numbers of a structure.
method A product <T, A> (K<T, A> ta) Source #
Computes the product of the numbers of a structure.
method Option<A> head <T, A> (K<T, A> ta) Source #
Get the head item in the foldable or None
method Option<A> last <T, A> (K<T, A> ta) Source #
Get the head item in the foldable or None
method K<F, Unit> iter <T, A, F, B> (Func<A, K<F, B>> f, K<T, A> ta) Source #
Map each element of a structure to an 'Applicative' action, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results see Traversable.traverse
.
method Unit iter <T, A> (Action<int, A> f, K<T, A> ta) Source #
Map each element of a structure to an action, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results see Traversable.traverse
.
method Unit iter <T, A> (Action<A> f, K<T, A> ta) Source #
Map each element of a structure to an action, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results see Traversable.traverse
.
method Option<A> min <OrdA, T, A> (K<T, A> ta) Source #
Find the minimum value in the structure
method Option<A> min <T, A> (K<T, A> ta) Source #
Find the minimum value in the structure
method Option<A> max <OrdA, T, A> (K<T, A> ta) Source #
Find the maximum value in the structure
method Option<A> max <T, A> (K<T, A> ta) Source #
Find the maximum value in the structure
method A min <OrdA, T, A> (K<T, A> ta, A initialMin) Source #
Find the minimum value in the structure
method A min <T, A> (K<T, A> ta, A initialMin) Source #
Find the minimum value in the structure
method A max <OrdA, T, A> (K<T, A> ta, A initialMax) Source #
Find the maximum value in the structure
method A max <T, A> (K<T, A> ta, A initialMax) Source #
Find the maximum value in the structure
method A average <T, A> (K<T, A> ta) Source #
Find the average of all the values in the structure
method B average <T, A, B> (Func<A, B> f, K<T, A> ta) Source #
Find the average of all the values in the structure
method S foldWhile <T, A, S> ( Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S foldWhile <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S foldBackWhile <T, A, S> ( Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S foldBackWhile <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method K<M, S> foldWhileM <T, A, M, S> ( Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> foldWhileM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> foldBackWhileM <T, A, M, S> ( Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> foldBackWhileM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method S foldUntil <T, A, S> ( Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S foldUntil <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method K<M, S> foldUntilM <T, A, M, S> ( Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> foldUntilM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method S foldBackUntil <T, A, S> ( Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S foldBackUntil <T, A, S> ( Func<S, A, S> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method K<M, S> foldBackUntilM <T, A, M, S> ( Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> foldBackUntilM <T, A, M, S> ( Func<S, A, K<M, S>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method S fold <T, A, S> (Func<A, Func<S, S>> f, S initialState, K<T, A> ta) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method S fold <T, A, S> (Func<S, A, S> f, S initialState, K<T, A> ta) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method K<M, S> foldM <T, A, M, S> ( Func<A, Func<S, K<M, S>>> f, S initialState, K<T, A> ta) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method K<M, S> foldM <T, A, M, S> ( Func<S, A, K<M, S>> f, S initialState, K<T, A> ta) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method S foldBack <T, A, S> (Func<S, Func<A, S>> f, S initialState, K<T, A> ta) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method S foldBack <T, A, S> (Func<S, A, S> f, S initialState, K<T, A> ta) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method K<M, S> foldBackM <T, A, M, S> ( Func<S, Func<A, K<M, S>>> f, S initialState, K<T, A> ta) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method K<M, S> foldBackM <T, A, M, S> ( Func<S, A, K<M, S>> f, S initialState, K<T, A> ta) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method A fold <T, A> (K<T, A> tm) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method A foldWhile <T, A> (Func<(A State, A Value), bool> predicate, K<T, A> tm) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method A foldUntil <T, A> (Func<(A State, A Value), bool> predicate, K<T, A> tm) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method B foldMap <T, A, B> (Func<A, B> f, K<T, A> ta) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B foldMapWhile <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B foldMapUntil <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B foldMapBack <T, A, B> (Func<A, B> f, K<T, A> ta) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method B foldMapBackWhile <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method B foldMapBackUntil <T, A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method K<F, Unit> iter <T, A, F, B> (Func<A, K<F, B>> f, K<T, A> ta) Source #
Map each element of a structure to an 'Applicative' action, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results see Traversable.traverse
.
method Unit iter <T, A> (Action<int, A> f, K<T, A> ta) Source #
Map each element of a structure to an action, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results see Traversable.traverse
.
interface Foldable <out T> Source #
method S FoldWhile <A, S> ( Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldBackWhile <A, S> ( Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method S FoldMaybe <A, S> ( Func<S, Func<A, Option<S>>> f, S initialState, K<T, A> ta) Source #
Fold until the Option
returns None
type | A | Value type |
type | S | State type |
param | f | Fold function |
param | initialState | Initial state for the fold |
param | ta | Foldable structure |
returns | Aggregated value |
method S FoldBackMaybe <A, S> ( Func<A, Func<S, Option<S>>> f, S initialState, K<T, A> ta) Source #
Fold until the Option
returns None
type | A | Value type |
type | S | State type |
param | f | Fold function |
param | initialState | Initial state for the fold |
param | ta | Foldable structure |
returns | Aggregated value |
method K<M, S> FoldWhileM <A, M, S> ( Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method K<M, S> FoldBackWhileM <A, M, S> ( Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method S FoldUntil <A, S> ( Func<A, Func<S, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as Fold
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method K<M, S> FoldUntilM <A, M, S> ( Func<A, Func<S, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
method S FoldBackUntil <A, S> ( Func<S, Func<A, S>> f, Func<(S State, A Value), bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but allows early exit of the operation once
the predicate function becomes false
for the state/value pair
method K<M, S> FoldBackUntilM <A, M, S> ( Func<S, Func<A, K<M, S>>> f, Func<A, bool> predicate, S initialState, K<T, A> ta) Source #
Same behaviour as FoldBack
but the fold operation returns a monadic type and allows
early exit of the operation once the predicate function becomes false
for the
state/value pair
method S Fold <A, S> (Func<A, Func<S, S>> f, S initialState, K<T, A> ta) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method K<M, S> FoldM <A, M, S> ( Func<A, Func<S, K<M, S>>> f, S initialState, K<T, A> ta) Source #
Right-associative fold of a structure, lazy in the accumulator.
In the case of lists, 'Fold', when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left.
method S FoldBack <A, S> (Func<S, Func<A, S>> f, S initialState, K<T, A> ta) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method K<M, S> FoldBackM <A, M, S> ( Func<S, Func<A, K<M, S>>> f, S initialState, K<T, A> ta) Source #
Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.
In the case of lists, 'FoldLeft', when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right
Note that to produce the outermost application of the operator the entire input list must be traversed. Like all left-associative folds, `FoldBack' will diverge if given an infinite list.
method A Fold <A> (K<T, A> tm) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method A FoldWhile <A> (Func<(A State, A Value), bool> predicate, K<T, A> tm) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method A FoldUntil <A> (Func<(A State, A Value), bool> predicate, K<T, A> tm) Source #
Given a structure with elements whose type is a Monoid
, combine them
via the monoid's Append
operator. This fold is right-associative and
lazy in the accumulator. When you need a strict left-associative fold,
use 'foldMap'' instead, with 'id' as the map.
method B FoldMap <A, B> (Func<A, B> f, K<T, A> ta) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B FoldMapWhile <A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B FoldMapUntil <A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta) Source #
Map each element of the structure into a monoid, and combine the
results with Append
. This fold is right-associative and lazy in the
accumulator. For strict left-associative folds consider FoldMapBack
instead.
method B FoldMapBack <A, B> (Func<A, B> f, K<T, A> ta) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method B FoldMapBackWhile <A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method B FoldMapBackUntil <A, B> (Func<A, B> f, Func<(B State, A Value), bool> predicate, K<T, A> ta) Source #
A left-associative variant of 'FoldMap' that is strict in the
accumulator. Use this method for strict reduction when partial
results are merged via Append
.
method Iterable<A> ToIterable <A> (K<T, A> ta) Source #
List of elements of a structure, from left to right
method int Count <A> (K<T, A> ta) Source #
Returns the size/length of a finite structure as an int
. The
default implementation just counts elements starting with the leftmost.
Instances for structures that can compute the element count faster than via element-by-element counting, should provide a specialised implementation.
method bool Exists <A> (Func<A, bool> predicate, K<T, A> ta) Source #
Does an element that fits the predicate occur in the structure?
method bool ForAll <A> (Func<A, bool> predicate, K<T, A> ta) Source #
Does the predicate hold for all elements in the structure?
method bool Contains <EqA, A> (A value, K<T, A> ta) Source #
Does the element exist in the structure?
method Option<A> Find <A> (Func<A, bool> predicate, K<T, A> ta) Source #
Find the first element that match the predicate
method Option<A> FindBack <A> (Func<A, bool> predicate, K<T, A> ta) Source #
Find the last element that match the predicate
method Seq<A> FindAll <A> (Func<A, bool> predicate, K<T, A> ta) Source #
Find the the elements that match the predicate
method Seq<A> FindAllBack <A> (Func<A, bool> predicate, K<T, A> ta) Source #
Find the the elements that match the predicate
method A Sum <A> (K<T, A> ta) Source #
Computes the sum of the numbers of a structure.
method A Product <A> (K<T, A> ta) Source #
Computes the product of the numbers of a structure.
method K<F, Unit> Iter <A, F, B> (Func<A, K<F, B>> f, K<T, A> ta) Source #
Map each element of a structure to an 'Applicative' action, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results see Traversable.traverse
.
method Unit Iter <A> (Action<A> f, K<T, A> ta) Source #
Map each element of a structure to an action, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results see Traversable.traverse
.
method Unit Iter <A> (Action<int, A> f, K<T, A> ta) Source #
Map each element of a structure to an action, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results see Traversable.traverse
.
method Option<A> Min <OrdA, A> (K<T, A> ta) Source #
Find the minimum value in the structure
method Option<A> Min <A> (K<T, A> ta) Source #
Find the minimum value in the structure
method Option<A> Max <OrdA, A> (K<T, A> ta) Source #
Find the maximum value in the structure
method Option<A> Max <A> (K<T, A> ta) Source #
Find the maximum value in the structure
method A Min <OrdA, A> (K<T, A> ta, A initialMin) Source #
Find the minimum value in the structure
method A Min <A> (K<T, A> ta, A initialMin) Source #
Find the minimum value in the structure
method A Max <OrdA, A> (K<T, A> ta, A initialMax) Source #
Find the maximum value in the structure
method A Max <A> (K<T, A> ta, A initialMax) Source #
Find the maximum value in the structure
method A Average <A> (K<T, A> ta) Source #
Find the average of all the values in the structure
method B Average <A, B> (Func<A, B> f, K<T, A> ta) Source #
Find the average of all the values in the structure