Let's say I want all permutations of 2 letters out of a, b and c.
I can do:
my @perm = <a b c>.combinations(2)».permutations;
say @perm;
# [((a b) (b a)) ((a c) (c a)) ((b c) (c b))]
which is close, but not exactly what I need. How do I “flatten” this so that I get:
# [(a b) (b a) (a c) (c a) (b c) (c b)]
?