Hi,
what about:
forall: func [
"Evaluates a block for every value in a series."
[throw]
'word [word!] {Word set to each position in series and changed
as a result}
body [block!] "Block to evaluate each time"
/former
/head
/local fmr
][
if former [fmr: get word]
while [not tail? get word] [
do body
set word next get word
]
if former [set word fmr]
if head [set word head get word]
]
Regards
Ladislav
> Excellent question that I did not even think about!!!
>
> how about these two:
>
> >> forall/then-former ;- put back to state before loop
> >> forall/then-head ;- put back to head
>
>
> ---
>
> ; run this in your
> ; <a href=http://www.rebol.com>REBOL</a> Interpreter!
> terrence-brannon: [ [EMAIL PROTECTED] perl-refugee
myth-gamer ]
> perl-refugee: [ 'loved href perl discovery: (metaperl = rebol)
'hates href perl ]
> myth-gamer:http://www.bungie.net/bin/stats.pl?player=princepawn
>
> ; angles makes this a href instead of code! use ur imagination!
> href: func [U T] [ rejoin [ "a href=" U ">" T "/a" ] ]
> perl: href http://www.perl.com "Perl"
>
>
> On Tue, 29 Aug 2000 12:06:01
> joel.neely wrote:
> >Hmmmm...
> >
> >Reset to what? The position of the series just before the
forall loop,
> >or the beginning of the series?
> >
> >-jn-
> >
> >[EMAIL PROTECTED] wrote:
> >>
> >> I'm sure you've seen the REBOL idiom:
> >>
> >> forall line [
> >> ...
> >> ]
> >>
> >> line: head line
> >>
> >> I would appreciate it if I could type:
> >>
> >> forall/then-reset line [
> >> ...
> >> ]
> >>
> >> Get your FREE Email and Voicemail at Lycos Communications at
> >> http://comm.lycos.com
> >
> >--
> >; Joel Neely [EMAIL PROTECTED] 901-263-4460
38017/HKA/9677
> >REBOL [] print to-string debase/64 decompress #{
> > 789C0BCE0BAB4A7176CA48CAB53448740FABF474F3720BCC
> > B6F4F574CFC888342AC949CE74B50500E1710C0C24000000}
> >
> >
>
>
> Get your FREE Email and Voicemail at Lycos Communications at
> http://comm.lycos.com
>
>