static <T1, T2> Seq<Tuple2<T1, T2>> outerApply(Seq<? extends T1> seq, Function<? super T1, ? extends Seq<? extends T2>> function2) {
        return seq.flatMap(t1 -> function2.apply(t1).onEmpty(null).map(t2 -> tuple(t1, t2)))
                  .onClose(seq::close);
    }
Outer apply 2 functions to a stream.
<p>
<pre><code>
// (tuple(0, null), tuple(1, 0), tuple(2, 0), tuple(2, 1))
Seq.of(0, 1, 2).outerApply(t -> Seq.range(0, t))
</code></pre>
jOOL-java-8/src/main/java/org/jooq/lambda/Seq.java