On Dec 19, 2007 9:08 PM, Kai Peters <[EMAIL PROTECTED]> wrote:

>> o1: make object! []
>> o2: make object! []
>>
>> probe type? o2
object!
== object!
>>
>> s: [ o1 o2 ]
== [o1 o2]
>>
>> probe type? s/1
word!
== word!

> Hmm - why the type change here from object to word?
>
> More importantly, how do I overcome this?
>
> I need to iterate over all the objects in a block and operate
> on them as objects - not words...

No type change here.  [o1 o2] is just a block of words.  In a block,
they are just words, though they are bound to the context they are
generated in.  The two main options you have are:

>> foreach obj reduce s [probe obj]
>> foreach word s [probe get/any :word]

Note: you don't need to use a get-word! in the second example - in
some cases, the intent is clearer.

- Chris
-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to