Cutting sequence into batches of fixed length, making overlapping sliding data windows, getting each n-th item from a sequence - all these tasks can be solved using a single generic slicing function. For example, Clojure offers for such purposes partition size skip
library function.
F# core library offers Seq.windowed
function that implements sliding windows overlapping by 1. Seq.windowed width
would be simply equivalent to partition width 1
; varying partition
arguments allows solving other problems: partition size size
slices sequence into non-overlapping batches, partition 1 n
gets each n-th sequence item, etc.
It is not that hard to implement such functionality in F#. I once posted a naive prototype that suffers from redundant sequence evaluations; however making it into truly lazy production quality F# implementation is definitely doable.
I wonder if it was any particular reason for limiting out-of-the-box F# core library offering for sequence slicing to Seq.windowed
function only?