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]
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
; http://www.rebol.com>REBOL Interpreter!
terrence-brannon: [ [EMAIL PROTECTED] perl-refugee myth-
H...
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/t
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