Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const product = (...sets) =>
- sets.reduce((acc, set) =>
- [].concat(...acc.map(x => set.map(y => [ ...x, y ]))),
- [[]]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement