[REBOL] Re: nforeach
From: AJMartin:orcon at: 23-Jul-2003 18:57
Gabriele wrote:
> It works this way:
>
> >> nforeach [a [1 2 3] b [4 5 6]] [print [a b]]
I've been wanting something like this for a while. Thank you, Gabriele!
I think I might like it better like this:
>> nforeach [a b] [[1 2 3] [4 5 6]] [print [a b]]
That's because when working with a table of data (rows and columns of data)
it might be easier to write things like:
Table_Header: [a b]
Table_Rows: [
[1 4]
[2 5]
[3 6]
]
>> transpose Table_Rows
== [[1 2 3] [4 5 6]]
nforeach Table_Header transpose Table_Data [print [a b]]
Andrew J Martin
ICQ: 26227169 http://www.rebol.it/Valley/ http://Valley.150m.com/