VocabularygroupingInputs and outputs| seq | a sequence |
| n | a non-negative integer |
| groups | a groups |
Word descriptionOutputs a virtual sequence whose elements are slices of disjoint subsequences of
n elements from the underlying sequence.
ExamplesUSING: arrays kernel prettyprint sequences grouping ;
9 iota >array 3 <sliced-groups>
dup [ reverse! drop ] each concat >array .
{ 2 1 0 5 4 3 8 7 6 }
USING: kernel prettyprint sequences grouping ;
{ 1 2 3 4 5 6 } 3 <sliced-groups> second .
T{ slice { from 3 } { to 6 } { seq { 1 2 3 4 5 6 } } }
See also<sliced-clumps>,
<sliced-circular-clumps>Definition