<circular-clumps> ( seq n -- clumps )
Factor handbook » The language » Collections » Sequence operations » Groups and clumps

Prev:circular-clumps
Next:monotonic? ( seq quot: ( elt1 elt2 -- ? ) -- ? )


Vocabulary
grouping

Inputs
seqa sequence
na non-negative integer


Outputs
clumpsa clumps


Word description
Outputs a virtual sequence whose elements are overlapping slices of n elements from the underlying sequence, starting with each of its elements and wrapping around the end of the sequence.

Examples
USING: arrays kernel sequences grouping prettyprint ; { 1 2 3 4 } 3 <circular-clumps> third >array .
{ 3 4 1 }


See also
<clumps>, <groups>

Definition