Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Extract - bug

From: al::bri::xtra::co::nz at: 19-Oct-2001 15:02

There's a bug with 'extract. It doesn't work with all series! and doesn't have a /only refinement. Also, it uses: pick series 1 when: first series is all that's needed. Here's my patch: ; Modifies Extract to work with series! and adds /Only refinement. Extract: function [ "Extracts every N-th value from a Series." Series [series!] N [integer!] /Only "Appends a block value as a block." ][ New ][ New: make Series (length? Series) / N do compose/deep [ forskip Series N [ (either Only ['insert/only]['insert]) tail New first Series ] ] New ] I've sent this to feedback as well. Andrew Martin ICQ: 26227169