Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is why we need a global Iterator / Iterable type. These are iterators at the end of the day after all. That would also signal the fact they could be used for more than one data structure (Array, Map, POJOs)


Global iterator type is coming: https://github.com/tc39/proposal-iterator-helpers

But a method named `groupBy` on iterators traditionally means a different thing: https://github.com/tc39/proposal-array-grouping/issues/51#is...

Global iterable type it's too late for, since there's many extant iterables in the language and on the web which don't have it in their prototype chain and can't reasonably be changed.


Stop it please! Just add the pipleline proposal and we can use a library or define our own function.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: