something like this? ```val list1 = listOf("a", "b...
# getting-started
a
something like this?
Copy code
val list1 = listOf("a", "b")
    val list2 = listOf(1,2,3)
    val cartesianProduct = list1.map { e1-> list2.map { e2-> e1 to e2 } }.flatten()
o
list1.flatMap { e1-> list2.map { e2-> e1 to e2 } }
👍 2
h
Maybe it should just return a list of lists, because you could also get the cartesian product of more than 2 lists
p
that works, thank you