fold Left Product
inline fun <T, S, C> List<S>.foldLeftProduct(initialContext: C, crossinline map: (C, S) -> Iterator<Pair<C, T>>): Iterable<List<T>>
Content copied to clipboard
Constructs a cartesian product of the given ordered list of source elements, by computing the Iterable via a mapping function with a context. The mapping function constructs an Iterator of Pair instances of C and S that are used to derive subsequent iterators.