showing results for - "powerset"
Daniele
01 Jan 2018
1const powerset = arr =>
2  arr.reduce((a, v) => a.concat(a.map(r => [v].concat(r))), [[]]);
similar questions
queries leading to this page
powerset