[REBOL] Re: Generic Block to Object solution
From: al:bri:xtra at: 9-Dec-2000 9:17
> Make-Objects: func [
> Table [block!]
> Prototype! [object!]
> /local Specification Result Object
> ] [
> Specification: first Table
> Result: make block! to-integer divide length? next Table length?
Specification
> foreach :Specification next Table compose/deep [
> Object: make Prototype! []
> set bind [(Specification)] in Object 'self reduce [(Specification)]
> insert tail Result Object
> ]
> Result
> ]
Thank you, Gabriele!
Now I've got to work out how to do the reverse, and implement a form of
inheritance in the objects.
Andrew Martin
ICQ: 26227169 http://members.nbci.com/AndrewMartin/