Contents
- TransduceFromM <M, IN>
- TransducerM <M, A, B>
- Reduce <S> (ReducerM<M, B, S> reducer)
- Compose <C> (TransducerM<M, B, C> tg)
- Map <C> (Func<B, C> f)
- Comap <X> (Func<X, A> f)
- Bind <C> (Func<B, K<TransduceFromM<M, A>, C>> f)
- Bind <C> (Func<B, TransducerM<M, A, C>> f)
- SelectMany <C, D> (Func<B, K<TransduceFromM<M, A>, C>> bind, Func<B, C, D> project)
- SelectMany <C, D> (Func<B, TransducerM<M, A, C>> bind, Func<B, C, D> project)
- TransducerMExtensions
- As <M, A, B> (this K<TransduceFromM<M, A>, B> ma)
- As <M, A, B> (this K<TransduceToM<M, B>, A> ma)
- Filter <M, A, B> (this TransducerM<M, A, B> tab, Func<B, bool> f)
- Where <M, A, B> (this TransducerM<M, A, B> tab, Func<B, bool> f)
- Take <M, A, B> (this TransducerM<M, A, B> tab, int n)
- Skip <M, A, B> (this TransducerM<M, A, B> tab, int n)
- FoldWhile <M, A, B, S> ( this TransducerM<M, A, B> tab, Func<S, B, S> Folder, Func<S, B, bool> Pred, S State)
- FoldWhile <M, A, B, S> ( this TransducerM<M, A, B> tab, Schedule Schedule, Func<S, B, S> Folder, Func<S, B, bool> Pred, S State)
- FoldUntil <M, A, B, S> ( this TransducerM<M, A, B> tab, Func<S, B, S> Folder, Func<S, B, bool> Pred, S State)
- FoldUntil <M, A, B, S> ( this TransducerM<M, A, B> tab, Schedule Schedule, Func<S, B, S> Folder, Func<S, B, bool> Pred, S State)
- TransducerM
- identity <M, A> ()
- constant <M, A, B> (B value)
- compose <M, A, B, C> ( TransducerM<M, A, B> ta, TransducerM<M, B, C> tb)
- compose <M, A, B, C, D> ( TransducerM<M, A, B> ta, TransducerM<M, B, C> tb, TransducerM<M, C, D> tc)
- compose <M, A, B, C, D, E> ( TransducerM<M, A, B> ta, TransducerM<M, B, C> tb, TransducerM<M, C, D> tc, TransducerM<M, D, E> td)
- compose <M, A, B, C, D, E, F> ( TransducerM<M, A, B> ta, TransducerM<M, B, C> tb, TransducerM<M, C, D> tc, TransducerM<M, D, E> td, TransducerM<M, E, F> te)
- compose <M, A, B, C, D, E, F, G> ( TransducerM<M, A, B> ta, TransducerM<M, B, C> tb, TransducerM<M, C, D> tc, TransducerM<M, D, E> td, TransducerM<M, E, F> te, TransducerM<M, F, G> tf)
- skip <M, A> (int amount)
- take <M, A> (int amount)
- map <M, A, B> (Func<A, B> f)
- filter <M, A> (Func<A, bool> predicate)
- bind <M, Env, A, B> (TransducerM<M, Env, A> ta, Func<A, K<TransduceFromM<M, Env>, B>> f)
- bind <M, Env, A, B> (TransducerM<M, Env, A> ta, Func<A, TransducerM<M, Env, B>> f)
- foldWhile <M, A, S> ( Func<S, A, S> Folder, Func<S, A, bool> Pred, S State)
- foldWhile <M, A, S> ( Schedule Schedule, Func<S, A, S> Folder, Func<S, A, bool> Pred, S State)
- foldUntil <M, A, S> ( Func<S, A, S> Folder, Func<S, A, bool> Pred, S State)
- foldUntil <M, A, S> ( Schedule Schedule, Func<S, A, S> Folder, Func<S, A, bool> Pred, S State)
- TransduceToM <M, OUT>
Sub modules
DSL |
class TransduceFromM <M, IN> Source #
record TransducerM <M, A, B> Source #
Methods
method ReducerM<M, A, S> Reduce <S> (ReducerM<M, B, S> reducer) Source #
Fold the input stream using the supplied reducer.
Parameters
type | S | State |
param | reducer | Reducer that folds the stream of values flowing through the transducer |
returns |
method TransducerM<M, A, C> Compose <C> (TransducerM<M, B, C> tg) Source #
Compose two transducers together. The output of the first transducer is the input to the second.
method TransducerM<M, A, D> SelectMany <C, D> (Func<B, K<TransduceFromM<M, A>, C>> bind, Func<B, C, D> project) Source #
Monadic bind
method TransducerM<M, A, D> SelectMany <C, D> (Func<B, TransducerM<M, A, C>> bind, Func<B, C, D> project) Source #
Monadic bind
class TransducerMExtensions Source #
Methods
method TransducerM<M, A, B> As <M, A, B> (this K<TransduceFromM<M, A>, B> ma) Source #
Downcast operator
method TransducerM<M, A, B> As <M, A, B> (this K<TransduceToM<M, B>, A> ma) Source #
Downcast operator
method TransducerM<M, A, B> Filter <M, A, B> (this TransducerM<M, A, B> tab, Func<B, bool> f) Source #
Filter values flowing through the transducer.
method TransducerM<M, A, B> Where <M, A, B> (this TransducerM<M, A, B> tab, Func<B, bool> f) Source #
Filter values flowing through the transducer.
method TransducerM<M, A, B> Take <M, A, B> (this TransducerM<M, A, B> tab, int n) Source #
Take the first n
values from the stream.
method TransducerM<M, A, B> Skip <M, A, B> (this TransducerM<M, A, B> tab, int n) Source #
Skip the first n
values from the stream.
method TransducerM<M, A, S> FoldWhile <M, A, B, S> ( this TransducerM<M, A, B> tab, Func<S, B, S> Folder, Func<S, B, bool> Pred, S State) Source #
method TransducerM<M, A, S> FoldWhile <M, A, B, S> ( this TransducerM<M, A, B> tab, Schedule Schedule, Func<S, B, S> Folder, Func<S, B, bool> Pred, S State) Source #
class TransducerM Source #
Methods
method TransducerM<M, A, A> identity <M, A> () Source #
Identity transducer. Has no effect on values flowing through.
Parameters
type | A | Bound value type |
returns | Identity transducer |
method TransducerM<M, A, B> constant <M, A, B> (B value) Source #
Constant transducer. Ignores all incoming values and yields the constant value.
Parameters
type | B | Constant value type |
returns | Constant transducer |
method TransducerM<M, A, C> compose <M, A, B, C> ( TransducerM<M, A, B> ta, TransducerM<M, B, C> tb) Source #
Compose transducers together. The output of each transducer is fed into the next transducer.
Parameters
param | ta | First transducer |
param | tb | Second transducer |
returns | Composed transducer |
method TransducerM<M, A, D> compose <M, A, B, C, D> ( TransducerM<M, A, B> ta, TransducerM<M, B, C> tb, TransducerM<M, C, D> tc) Source #
Compose transducers together. The output of each transducer is fed into the next transducer.
Parameters
param | ta | First transducer |
param | tb | Second transducer |
param | tc | Third transducer |
returns | Composed transducer |
method TransducerM<M, A, E> compose <M, A, B, C, D, E> ( TransducerM<M, A, B> ta, TransducerM<M, B, C> tb, TransducerM<M, C, D> tc, TransducerM<M, D, E> td) Source #
Compose transducers together. The output of each transducer is fed into the next transducer.
Parameters
param | ta | First transducer |
param | tb | Second transducer |
param | tc | Third transducer |
param | td | Fourth transducer |
returns | Composed transducer |
method TransducerM<M, A, F> compose <M, A, B, C, D, E, F> ( TransducerM<M, A, B> ta, TransducerM<M, B, C> tb, TransducerM<M, C, D> tc, TransducerM<M, D, E> td, TransducerM<M, E, F> te) Source #
Compose transducers together. The output of each transducer is fed into the next transducer.
Parameters
param | ta | First transducer |
param | tb | Second transducer |
param | tc | Third transducer |
param | td | Fourth transducer |
param | te | Fifth transducer |
returns | Composed transducer |
method TransducerM<M, A, G> compose <M, A, B, C, D, E, F, G> ( TransducerM<M, A, B> ta, TransducerM<M, B, C> tb, TransducerM<M, C, D> tc, TransducerM<M, D, E> td, TransducerM<M, E, F> te, TransducerM<M, F, G> tf) Source #
Compose transducers together. The output of each transducer is fed into the next transducer.
Parameters
param | ta | First transducer |
param | tb | Second transducer |
param | tc | Third transducer |
param | td | Fourth transducer |
param | te | Fifth transducer |
param | tf | Sixth transducer |
returns | Composed transducer |
method TransducerM<M, A, A> skip <M, A> (int amount) Source #
Skip amount
items in the sequence before yielding
Parameters
type | A | Value type |
param | amount | Number of items to skip |
returns | Transducer that skips values |
method TransducerM<M, A, A> take <M, A> (int amount) Source #
Take amount
items in the sequence before terminating
Parameters
type | A | Value type |
param | amount | Number of items to take |
returns | Transducer that takes |
method TransducerM<M, A, B> map <M, A, B> (Func<A, B> f) Source #
Functor map transducer
Parameters
type | A | Input value type |
type | B | Output value type |
param | f | Function to map values of type |
returns | Mapping transducer |
method TransducerM<M, A, A> filter <M, A> (Func<A, bool> predicate) Source #
Applicative filter transducer
Parameters
type | A | Bound value type |
param | predicate | Filters each value flowing through the transducer. If |
returns | Filtering transducer |
method TransducerM<M, Env, B> bind <M, Env, A, B> (TransducerM<M, Env, A> ta, Func<A, K<TransduceFromM<M, Env>, B>> f) Source #
Monad bind transducer
Chains two transducers together
Parameters
type | Env | Input value type |
type | A | Result value type of the first transducer |
type | B | Result value type of returned transducer |
param | ta | Initial transducer to run |
param | f | Chaining function to run with the result of |
returns | A monadic bind transducer operation |
method TransducerM<M, Env, B> bind <M, Env, A, B> (TransducerM<M, Env, A> ta, Func<A, TransducerM<M, Env, B>> f) Source #
Monad bind transducer
Chains two transducers together
Parameters
type | Env | Input value type |
type | A | Result value type of the first transducer |
type | B | Result value type of returned transducer |
param | ta | Initial transducer to run |
param | f | Chaining function to run with the result of |
returns | A monadic bind transducer operation |
method TransducerM<M, A, S> foldWhile <M, A, S> ( Func<S, A, S> Folder, Func<S, A, bool> Pred, S State) Source #
Fold items in the stream while the predicate returns true; once the predicate returns false, the aggregated value is yielded downstream.
Parameters
type | A | Bound value type |
type | S | Yielded aggregate value type |
param | Folder | Aggregating binary fold function |
param | Pred | Predicate |
param | State | Initial state |
returns | Aggregating binary folding transducer |
method TransducerM<M, A, S> foldWhile <M, A, S> ( Schedule Schedule, Func<S, A, S> Folder, Func<S, A, bool> Pred, S State) Source #
Fold items in the stream while the predicate returns true; once the predicate returns false, the aggregated value is yielded downstream.
Parameters
type | A | Bound value type |
type | S | Yielded aggregate value type |
param | Schedule | Schedule for each yielded item |
param | Folder | Aggregating binary fold function |
param | Pred | Predicate |
param | State | Initial state |
returns | Aggregating binary folding transducer |
method TransducerM<M, A, S> foldUntil <M, A, S> ( Func<S, A, S> Folder, Func<S, A, bool> Pred, S State) Source #
Fold items in the stream until the predicate returns true; once the predicate returns true, the aggregated value is yielded downstream.
Parameters
type | A | Bound value type |
type | S | Yielded aggregate value type |
param | Folder | Aggregating binary fold function |
param | Pred | Predicate |
param | State | Initial state |
returns | Aggregating binary folding transducer |
method TransducerM<M, A, S> foldUntil <M, A, S> ( Schedule Schedule, Func<S, A, S> Folder, Func<S, A, bool> Pred, S State) Source #
Fold items in the stream until the predicate returns true; once the predicate returns true, the aggregated value is yielded downstream.
Parameters
type | A | Bound value type |
type | S | Yielded aggregate value type |
param | Schedule | Schedule for each yielded item |
param | Folder | Aggregating binary fold function |
param | Pred | Predicate |
param | State | Initial state |
returns | Aggregating binary folding transducer |
class TransduceToM <M, OUT> Source #