作 ▸
2次元配列を総当たりのパターンに展開
// これを…
const before = [['A','B'], ['C','D','E'], ['F','G']];
// こう
const after = [
['A','C','F'],
['B','C','F'],
['A','D','F'],
['B','D','F'],
['A','E','F'],
['B','E','F'],
['A','C','G'],
['B','C','G'],
['A','D','G'],
['B','D','G'],
['A','E','G'],
['B','E','G'],
];