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

[REBOL] Re: Is there a REBOL construct similar to the "map" word as used in Logo

From: gerardcote:sympatico:ca at: 29-Jun-2002 0:10

Hello Gregg, You just sent me this "map" definition from Larry :
> ; Larry Palmiter > map: func [fn blk args /local result][ > result: copy [] > repeat el blk [append/only result fn :el args] > return result > ]
Thanks for this alternative "map" implementation that looks promising too. It seems that I am not the first REBOL newbie that sees an interest in this construct ... While looking at how this version was implemented, one question hurts my head that you may be able to answer while I am searching myself for more information about it. Where does the "el" word used in the repeat construct come from ? I don't see it anywhere being assigned a value or passed as a parameter before it is used and I find this a little strange. Is it a constant already known by REBOL, is there something missing, some part I don't understand or what else ? Regards, Gerard