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

[REBOL] Re: COLLECTing results

From: lmecir:mbox:vol:cz at: 26-Nov-2003 20:10

Hi all, two more cents to let Return work as usual: use [insert-only] [ insert-only: func [series value] [insert/only series value] collect: func [ {Collects block evaluations, use as body in For, Repeat, etc.} [throw] block [block!] "Block to evaluate." /initial result [series!] "Initialise the result." /only "Inserts into result using the Only refinement." ] [ result: any [make result result make block! 10] reduce [ :head pick reduce [ :insert :insert-only ] not only :tail result :do block ] ] ]