Scoop API

scoop:scoop.std:0.1.0

windowed

function windowed

source · line 42
public
public fun <T> Sequence<T>.windowed(size: Long, step: Long = 1L, partialWindows: Boolean = false): Sequence<List<T>>

Extension receiver: Sequence<T>

Evaluation is deferred until iteration. Produces copied windows at the requested step. Size and step must be positive; incomplete trailing windows are included only when partialWindows is true.