default Seq<Tuple2<Window<T>, Window<T>>> window(
        WindowSpecification<T> specification1,
        WindowSpecification<T> specification2
    ) {
        List<Tuple2<T, Long>> buffer = zipWithIndex().toList();

        Map<?, Partition<T>> partitions1 = SeqUtils.partitions(specification1, buffer);
        Map<?, Partition<T>> partitions2 = SeqUtils.partitions(specification2, buffer);

        return seq(buffer)
              .map(t -> tuple(
                   (Window<T>) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1),
                   (Window<T>) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2)
              ))
              .onClose(this::close);
    }
Map this stream to a windowed stream with 2 distinct windows.
jOOL-java-8/src/main/java/org/jooq/lambda/Seq.java