Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

piece function

   1  
   2      piece: func [
   3          {Returns one item from a series of fixed size "pieces".}
   4          series [series!]
   5          index  [integer!] "Item number, not series offset"
   6          size   [integer!] "Size of each piece in the series"
   7      ][
   8          ; Remember there is no precedence to math ops; just left-to-right.
   9          copy/part at series (index - 1 * size + 1) size
  10      ]
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS