Elias Mårtenson
2017-06-17 10:17:24 UTC
I'm sure there was a function that could do this, but for the life of me
can't figure out which one it was.
Assuming I have an array of values, I want to split them into groups of N
numbers, which are overlapping. I.e. if the group size is 3 and the array
contains the values 1 2 3 4 5 6, I want the result to be:
(1 2 3) (2 3 4) (3 4 5) (4 5 6)
How do I do this?
can't figure out which one it was.
Assuming I have an array of values, I want to split them into groups of N
numbers, which are overlapping. I.e. if the group size is 3 and the array
contains the values 1 2 3 4 5 6, I want the result to be:
(1 2 3) (2 3 4) (3 4 5) (4 5 6)
How do I do this?