static <T1, T2, T3, T4, T5, T6, T7, T8, T9> Seq<Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>> crossApply(Seq<? extends T1> seq, Function<? super T1, ? extends Seq<? extends T2>> function2, Function<? super T2, ? extends Seq<? extends T3>> function3, Function<? super T3, ? extends Seq<? extends T4>> function4, Function<? super T4, ? extends Seq<? extends T5>> function5, Function<? super T5, ? extends Seq<? extends T6>> function6, Function<? super T6, ? extends Seq<? extends T7>> function7, Function<? super T7, ? extends Seq<? extends T8>> function8, Function<? super T8, ? extends Seq<? extends T9>> function9) {
        return seq.flatMap(t1 -> function2.apply(t1).map(t2 -> tuple(t1, t2)))
                  .flatMap(t -> function3.apply(t.v2).map(t3 -> t.concat(t3)))
                  .flatMap(t -> function4.apply(t.v3).map(t4 -> t.concat(t4)))
                  .flatMap(t -> function5.apply(t.v4).map(t5 -> t.concat(t5)))
                  .flatMap(t -> function6.apply(t.v5).map(t6 -> t.concat(t6)))
                  .flatMap(t -> function7.apply(t.v6).map(t7 -> t.concat(t7)))
                  .flatMap(t -> function8.apply(t.v7).map(t8 -> t.concat(t8)))
                  .flatMap(t -> function9.apply(t.v8).map(t9 -> t.concat(t9)))
                  .onClose(seq::close);
    }
Cross apply 9 functions to a stream.
<p>
<pre><code>
// (tuple(1, 0), tuple(2, 0), tuple(2, 1))
Seq.of(1, 2).crossApply(t -> Seq.range(0, t))
</code></pre>
jOOL/src/main/java/org/jooq/lambda/Seq.java