Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

sliding

Sequence.sliding

sliding window
blocks of size elements, each is offset by step elements to the previous one

examples:
`(0..5).sliding 3 1`
=> `[[0, 1, 2], [1, 2, 3], [2, 3, 4], [3, 4, 5]]`

`(0..9).sliding 3 2`
=> `[[0, 1, 2], [2, 3, 4], [4, 5, 6], [6, 7, 8]]`
Precondition
pre
  debug: size > 0
  debug: step > 0
0.095dev (GIT hash 09dff08de289bbb6f7136c7e2f8c66dcc1856bba)
last changed: 2026-04-16