UNPKG

228 BJavaScriptView Raw
1'use strict';
2function concat$(x, ...ys) {
3 for (var y of ys)
4 x.push(...y);
5 return x;
6}
7function repeat(x, n = 1) {
8 for (var a = []; n > 0; n--)
9 concat$(a, x);
10 return a;
11}
12module.exports = repeat;