In Groovy, given a sequence of function references (algorithms), and a sequence of pairs of integers (data), I can create the Cartesian product of these:

algorithms.collectMany{algorithm -> data.collect{datum -> [algorithm, datum[0], datum[1]]}}

it may be just the stress of having to get stuff together for a presentation on Saturday, but I cannot think of a good way of doing the same thing in Kotlin. Anyone any thoughts to help me achieve success?