Here are some functions i think would be great to add to the library:
dropLast(n): buffer the last n values and once the iterator completes, drop them. Release the rest on the fly.
dropWhile(predicate): skip values until predicate(value) returns true
enumerate: maps input value to [index, value]
find(predicate): drops values until predicate(value) returns true, then yields that single value and ends
nth(n): drops values until the nth value is reached then yields that single value and ends
Additions for higher order functionality:
zip( iterators[] ): normal zip functionality. yields arrays containing values from each iterator until all iterators end.
Here are some functions i think would be great to add to the library:
dropLast(n): buffer the lastnvalues and once the iterator completes, drop them. Release the rest on the fly.dropWhile(predicate): skip values untilpredicate(value)returnstrueenumerate: maps inputvalueto[index, value]find(predicate): drops values untilpredicate(value)returnstrue, then yields that single value and endsnth(n): drops values until thenth value is reached then yields that single value and endsAdditions for higher order functionality:
zip( iterators[] ): normal zip functionality. yields arrays containing values from each iterator until all iterators end.