Skip to content

Suggested additions to the "swiss army knife" #284

Description

@wellcaffeinated

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions