笛卡称积

125 阅读1分钟

笛卡称积arr.reduce((a, b) => { return a.flatMap(x => b.map(y => [...x, y]))}, [[]] )