map, the most important method in programming! Exactly the same as ES6
map, but lazy.
windowtakes a sequence and groups it into "windows" of a certain length. This works well with infinite sequences where you want to process some number of values at a time.
falseto allow the trailing edge of a sequence to not be divisible by the window size.
window, makes the window size 2. Groups a sequence as alternating pairs. Useful for processing data which alternates Map keys and values.
taplets you run side-effect generating functions on a sequence. Allows you to "tap in to" a data flow. Very useful for logging and debugging what values are flowing through the chain at a given location.
logprovides the most common use-case for `tap. Add this to a sequence chain to log each value that passes through it.
flatMapis used when mapping a list to each items related items. For example, if you wanted to map from a list of people to each persons list of friends. Despite each mapping function returning an array, the final output is a flatten array of all the results concattenated.
.map().flat(), but in
leisurethe item mappings won't execute until enough of the resulting values have been realized to trigger each map.
distinct, but allows a function to describe on what value the sequence should be unique.
trueand the other for
nthitem. Items are 1-indexed.
indexitem. Items are 0-indexed.
Mapwhich counts the occurances of each unique value. This realizes the entire sequence.