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

[REBOL] Re: Replacing placeholders?

From: tim-johnsons:web at: 8-Aug-2007 15:09

On Wednesday 08 August 2007, Kai Peters wrote:
> Thanks for that one - no way that this newbie here would have figured this > out anytime soon... > > If that's what you refer to as "getting behind the curve.." you must be > fishing for compliments :)
No. I code in several languages. When I get away from rebol for a while, my "reb-Q" drops.
> Well, at least I learned one little (unrelated) detail from your exercise: > > Having a word previously defined with the same name as the implicit loop > variable > overshadows the loop variable (forgive me if this terminology is not Rebol > proper)
There is a term called "shadowing" - used in scheme and lisp, but: see this:
>> names
== ["Tim" "Carlos" "Kai"]
>> key: "George"
== "George"
>> foreach key names[print key]
Tim Carlos Kai
>> key
== "George" ;; 'key has scope local to the 'foreach loop, ;; no shadowing here. Tim