Returns a Collector that processes every input element for which the given keyFun
returns the same key value at most once.
the element key type
a function taking an input element and its index, and returning a key
Returns a Collector that returns each unique input element at most once.
Returns a Collector that skips the initial amount
values of the input.
the amount of input values to skip
Returns a Collector that skips the last amount
values of the input.
the amount of last input values to skip
Returns a Collector that only processes those elements that are not equal to their predecessor.
Returns a Collector where between each two elements, the given elem
is added as extra input.
the element to insert between input elements
Returns a Collector where the output value(s) are mapped using the given mapFun
the new output type
a function from current output type R to new output type R2
Performs given monitorEffect
for each input element. By default does a console.log with the given tag
.
a tag to use with logging
the effect to perform for each input element
Returns a Collector where, at the occurence of given elem
element, remove
elements are skipped, and
insert
elements are inserted, at most amount
times.
the element to find
the amount of elements to skip when the element is found
the optional iterable to insert when the element is found
the maximum amount of time to replace an element
Returns a Collector that skips remove
elements at those input elements for which pred
returns true,
and then inserts th e optional iterable resulting from calling insert
with the found element and its
index, at most amount
times.
the predicate over input elements
the amount of elements to skip when pred is true
the iterable elements to insert when pred is true
the maximum amount of times to replace an input element
Returns a Collector that processes each nth
element of the input elements.
specifies the index of which each element that has a multiple of nth
will be processed
Returns a Collector that only process amount
elements from the given from
index of the input elements.
the index to start processing elements
the amount of elements to process
Returns a Collector that only processes the initial amount
values of the input.
the amount of input values to process
Returns a Collector that only processes the last amount
values of the input.
the amount of last input values to process
Creates a new Collector object from element type A to result type R
the definition of the state collector, containing:
initState
: the initial state of the Collector, optionally lazynextState
: a function taking the current state S and the next element A and returns the next state SstateToResult
: a function that takes a state S and maps it to a result Rescape?
: a predicate over a state S indicating whether its value can still ever changeGenerated using TypeDoc
Generic Collector type Represents a generic collectable computation
the input element type
the intermediate state type
the output value type