type-challenges/questions/296-medium-permutation
2021-02-03 13:44:16 +08:00
..
2020-11-24 09:10:54 +08:00
2021-02-03 13:44:16 +08:00
2021-02-03 13:44:16 +08:00

Permutation medium #union

by Naoto Ikuno @pandanoir

Take the Challenge    日本語

Implement permutation type that transforms union types into the array that includes permutations of unions.

type perm = Permutation<'A' | 'B' | 'C'>; // ['A', 'B', 'C'] | ['A', 'C', 'B'] | ['B', 'A', 'C'] | ['B', 'C', 'A'] | ['C', 'A', 'B'] | ['C', 'B', 'A']

Back Share your Solutions Check out Solutions