Generic iteration method idea with example implementation and tests
fatalis.erratum at gmail.com
Mon May 9 04:23:02 UTC 2016
To clarify, the few currently implemented methods are just to demonstrate
the idea; the full implementation should have the other methods like
`every()` to allow breaking the iteration and `forEach()` for side-effects.
Regarding the mention of lazy iteration, the point is that `Array.from()`,
which is required to use the `Array` iteration methods on other types,
transforms the iterator upfront, while, with a generic `every()` method, it
would be possible to process only part of the iterable before breaking.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss