> FWIW, the reduce seems perfectly clear to me

Sweet!

> ...but scanning through their docs I don’t think there’s anyway you could use them to get the same behaviour while only iterating over the collection once.

Yeah I was looking for some kind of merge function to use as well but this seemed like a decent alternative.

> As for the permutation stuff, I’d use list comprehensions:

Good call! Thanks.