squared

fun <T, R> Sequence<T>.squared(combinator: (T, T) -> R): Sequence<R>

Returns the lazy Cartesian product of this sequence with itself (see product), combining each pair of elements (including a value with itself) via combinator.


Same as squared, pairing up elements into Pairs instead of combining them via a custom function.