default Seq<Seq<T>> sliding(long size) {
        if (size <= 0)
            throw new IllegalArgumentException("Size must be >= 1");
        
        return window(0, size - 1).filter(w -> w.count() == size).map(w -> w.window());
    }
Map this stream to a stream containing a sliding window over the previous stream.
<p>
<pre><code>
// ((1, 2, 3), (2, 3, 4), (3, 4, 5))
.of(1, 2, 3, 4, 5).sliding(3);
</code></pre>
<p>
This is equivalent as using the more verbose window function version:
<pre><code>
int n = 3;
Seq.of(1, 2, 3, 4, 5)
   .window(0, n - 1)
   .filter(w -> w.count() == n)
   .map(w -> w.toList());
</code></pre>
jOOL-java-8/src/main/java/org/jooq/lambda/Seq.java