笛卡称积 holyfans 2021-09-03 125 阅读1分钟 笛卡称积arr.reduce((a, b) => { return a.flatMap(x => b.map(y => [...x, y]))}, [[]] )