The Seq module has a window function, but it gives you a sliding window, so it is not suitable for this question.
Here is my version, I have not tested how performance is compared with other answers, but it is prettier (I think!)
//Add an "extension function" to the Seq module module Seq = let rec chunks n (s:
Perhaps you can look at the fragments of the array .
Benjol
source share