Hey guys, is there anyway to permute all elements ...
# announcements
l
Hey guys, is there anyway to permute all elements in an array with all elements in the other? I'm trying to simplify this:
Copy code
val foo = firstArr.flatMap { a -> secondArr.map { b -> a to b } }
s
Permute? Isnt what you are doing the cartesian product ?
l
Uh.... Probably hahaha
Maybe permute is the wrong word in English
I wanted all possible combinations of the two lists
k
I feel like this is definitely missing in the stdib.