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

[REBOL] Re: COLLECTing results

From: brett:codeconscious at: 24-Jul-2003 16:12

Oops silly mistake. Forgot the DO. collect: func [ {Collects block evaluations, use with For, Repeat, etc.} block [block!] /init result "Initialise the result series." /only "Inserts into result using Only refinement." ] [ if empty? block [return block] compose/deep [ result: any [result make block! 100] (pick [insert insert/only] not only) tail result do [(block)] result ] ] I wonder if filtering can be added in a similar way? P.S Andrew: thanks for the tip regarding the "not only". Regards, Brett.