| Author: | tylerg |
|---|---|
| Mode: | factor |
| Date: | Wed, 9 Sep 2009 20:12:22 |
! hopefully this will make its way into the sequences vocabulary ! splits a sequence into a sequence of sequences of length n, with any remaining elements appended to the end ! feel free to post improvements :: nsplit ( seq n -- seq ) seq [ dup length n >= ] [ n cut swap ] produce swap append ;
| Author: | tylerg |
|---|---|
| Mode: | text |
| Date: | Wed, 9 Sep 2009 20:30:32 |
I have finally found the "groups" vocabulary, which provides this functionality and more.