Hi Scott
This is clumsy, but it works.
testob: func [ob /local out][
out: make block! 10
foreach el next first ob[
if not any-function? get in ob el [
append out el
append out get in ob el
]
]
return out
]
Hope this helps.
Larry
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 12, 2000 4:35 AM
Subject: [REBOL] objects and blocks
> Ok. Let's say I have an object like this:
>
> x: make object! [
> foo: 1
> bar: 2
> baz: 3
> somefunc: func ["some function"][...]
> someotherfunc: func ["some other function"][...]
> ]
>
> Is there a way to create a function that returns a block like this:
>
> [foo 1 bar 2 baz 3] i.e., [foo value_of_foo bar value_of_bar baz
> value_of_baz]?
>
> I've tried various things with 'in and 'bind with no success.
>
> The answer must be simple, but my neurons seem to be misfiring...
>
> Thanks in advance...:-)
>
> Scott
>
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>