Skip to content

window

In std/seq.

fn window(self, n: Int) : List<List<T>>

Every run of n consecutive elements of self, in order: [1, 2, 3, 4] | window(2) is [[1, 2], [2, 3], [3, 4]]. An n below 1 is an evaluation error.