[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] SeqColl windowing?



i'm looking for the nicest way to separate an array into overlapping subarrays, e.g. like this:

[1, 2, 3, 4, 5, 6, 7, 8, 9]
-> [[1, 2, 3], [2, 3, 4], [3, 4, 5], [4, 5, 6], [5, 6, 7], [6, 7, 8], [7, 8, 9]]
-> [[1, 2, 3], [3, 4, 5], [5, 6, 7], [7, 8, 9]]

any suggestions?

thx,
<sk>