[REBOL] Re: Iterators & Functionids
From: g:santilli:tiscalinet:it at: 27-Aug-2002 12:39
Hi Robert,
On Tuesday, August 27, 2002, 11:24:11 AM, you wrote:
RMM> Hi, I try to get the following behaviour:
[...]
What about:
foreach-record: func ['word records predicate action] [
predicate: func reduce [word] predicate
action: func reduce [word] action
foreach record records [
if predicate record [action record]
]
]
>> list: [1 2 3 4 5 6 7 8 9]
== [1 2 3 4 5 6 7 8 9]
>> foreach-record num list [even? num] [print num]
2
4
6
8
== none
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r