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

[REBOL] Re: 'get'ing a 'word from a block

From: anton:lexicon at: 1-Jan-2003 16:54

Well, Your block d contains three words, a b c, whose context is... in that block... (I think). You need to bind the words in the d block into the foreach's context (which we can get to using 'a as an example word in that context.) Having bound the words in d to the foreach context, they are still simply [a b c], so you need to reduce the block get a block of values out. So a bit of binding and reducing and you are fixed: d: [a b c] blk: [1 2 3 4 5 6 7 8 9] test: func [row [block!]][?? row] foreach :d blk code: [ ?? a ?? b ?? c test reduce bind d 'a ] Anton.