Creates a list such that whenever v_i has finite index in list i for each i, [v_1, v_2, ..., v_n] has finite index in the output list. It is different to cartesian product, so the order of elements are not sorted.
v_i
i
[v_1, v_2, ..., v_n]
The finite list of (possibly infinite) list.
The choose list.
const choice = choices(fromArray([range(0, 3), range(3, 6)]));const sequences = toArray(choice).map((seq) => toArray(seq));expect(sequences).toStrictEqual([ [0, 3], [0, 4], [1, 3], [0, 5], [1, 4], [2, 3], [1, 5], [2, 4], [2, 5],]); Copy
const choice = choices(fromArray([range(0, 3), range(3, 6)]));const sequences = toArray(choice).map((seq) => toArray(seq));expect(sequences).toStrictEqual([ [0, 3], [0, 4], [1, 3], [0, 5], [1, 4], [2, 3], [1, 5], [2, 4], [2, 5],]);
Creates a list such that whenever
v_ihas finite index in listifor eachi,[v_1, v_2, ..., v_n]has finite index in the output list. It is different to cartesian product, so the order of elements are not sorted.