We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python calls it itertools.chain:
itertools.chain
chain("ABC", [1, 2, 3]).toArray() === ["A", "B", "C", 1, 2, 3]
Like Array.concat, but lazy, and doesn't need its iterables to be marked with Symbol.isConcatSpreadable.
Array.concat
Symbol.isConcatSpreadable
(does the toolkit not have an Iterator Utilities section yet?)
The text was updated successfully, but these errors were encountered:
I believe this may be implemented as
function chain(...iterators) { return iterators.flatMap(identity); }
which is succinct, but a bit quirky maybe.
Alternatively,
function* chain(...iterators) { for (const iterator of iterators) { yield* iterator; } }
Sorry, something went wrong.
No branches or pull requests
Python calls it
itertools.chain
:Like
Array.concat
, but lazy, and doesn't need its iterables to be marked withSymbol.isConcatSpreadable
.(does the toolkit not have an Iterator Utilities section yet?)
The text was updated successfully, but these errors were encountered: