Open github-actions[bot] opened 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing issue as stale.
I propose .offset:
instead. By default .offset:
is the same as the size of the window. Setting .offset:
to 1 we would get the behavior of the .rolling
option defined here.
.offset:
is more flexible.
[Iterators] add
.rolling
optionthis would allow us to have a rolling window of values
for example, if we have a list of 10 values, and we want to
iterate over it with a window of 3 values, we would get:
[1,2,3], [2,3,4], [3,4,5], [4,5,6], [5,6,7], [6,7,8], [7,8,9], [8,9,10]
https://github.com/arturo-lang/arturo/blob/ed0410b81b479dcf090b239e2193a45ecf65cd5d/src/library/Iterators.nim#L12
ee6fca73fa4f70e752f77f0c2e09c36f7ee6e9ec