[Iterable] Flatten array proposal
ivoreis opened this issue · comments
Ivo Reis commented
I saw that there's no flatten generator and probably this might be useful and used by other generators.
Example usage:
[[1],[2]]::flatten() // yields [1,2]
Possible implementation in commit: 55f86dd
Ilja Everilä commented
Could be made even more generic ala python's I see your commit does exactly that.itertools.chain
: take an iterable of iterables (arrays, generators...) and create an iterator yielding their items sequentially. The same basic idea, but a bit more.
Jussi Kalliokoski commented
Duplicate of #8.