[REBOL] Re: Noob with a question
From: carl:cybercraft at: 26-Mar-2009 7:51
On Wednesday, 25-March-2009 at 20:14:25 mumpsoid wrote,
>I'm a new-guy in the REBOLution ;)
>At 62, I may be too old to make a good REBOLutionary, but I suppose
>that advocacy is ageless. I'm a self-taught, amateur Perl and M(umps)
>programmer. I've also had a long, hard look at Forth. I see in REBOL
>what appears to be "some" Forth influence. Could I be correct?
Very likely. In the forward to the REBOL Official Guide Carl Sassenrath mentions Forth,
including that he'd written a commercial version of it in the early 80s.
>The manual states:
>The forall advances the variable position through the series, so when
>it returns the variable is left at its tail:
>Therefore, the variable must be reset before it is used again:
>However. when I try it out I get:
> >> colors: [red green blue yellow orange]
> == [red green blue yellow orange]
> >> forall colors [print first colors]
> >> print tail? colors
>Thanks for the help and a great language!
In this case, the manual you're reading is out of date. FORALL used to work as described
there, but it was found to be of little use and that most wanted the blocks unchanged,
resulting in a lot of code like such...
forall colors [print first colors]
colors: head colors
The second line's not needed now, as you've discovered.
-- Carl Read.