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

[REBOL] Re: Noob with a question

From: mumpsoid:gmx at: 26-Mar-2009 6:58

On Thu, 26 Mar 2009, Carl Read wrote:
> On Wednesday, 25-March-2009 at 20:14:25 mumpsoid wrote, > > > Hi..... > > > >I'm a new-guy in the REBOLution ;) > > Welcome! > > >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.
I knew it! It "feels" a little Forthish.
> >Question: > >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] > > red > > green > > blue > > yellow > > orange > > >> > > >> print tail? colors > > false > > > >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.
Thanks for the heads-up about the outdated docs. So, in summary, I can walk through a series and leave the pointer at the "head" with `forall'. -- Duke Normandin A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?