windowedEnclosing

fun <T> Sequence<T>.windowedEnclosing(size: Int, step: Int = 1): Sequence<List<T>>

Creates a sequence of lists with size, iterating through the (receiver) sequence.

Receiver

the base sequence used to generate the sublists of size

Return

the sequence of sublists

Parameters

size

the size of the sublists to be returned

step

the number of elements to move on