cartesianProduct

fun <T> Sequence<T>.cartesianProduct(other: Sequence<T>): Sequence<Pair<T, T>>

Performs the cartesian product of two sequences.