Skip to content
wolfram77 edited this page Mar 27, 2020 · 24 revisions

Appends iterables to the end.

iterable.concat(x, ...ys);
// x:  an iterable
// ys: iterables to append
const iterable = require('extra-iterable');

var x = [1, 2];
[...iterable.concat(x, [3,  4])];
// [1, 2, 3, 4]

var y = [5, 6];
[...iterable.concat(x, y, y)];
// [
//   1, 2,
//   5, 6, 5, 6
// ]

references

Clone this wiki locally