Re: Example to introspect a class

2011-04-03 Thread Mushfaque Chowdhury
Thank you I'm still learning all the different forms so this is very helpful. On Apr 1, 10:13 pm, Ken Wesson wrote: > On Fri, Apr 1, 2011 at 10:56 AM, Mushfaque Chowdhury > > > > > > > > > > wrote: > > Hi > > > I'm trying to solve a introspection problem of the following type > > > (def Regio

Re: Example to introspect a class

2011-04-01 Thread Ken Wesson
On Fri, Apr 1, 2011 at 10:56 AM, Mushfaque Chowdhury wrote: > Hi > > I'm trying to solve a introspection problem of the following type > > (def Region {'fields '((datatype x) (datatype y))}) > > (def Country {'fields '((int x) (double y {reference `Region}))}) > > I'd like to introspect the fields

Re: Example to introspect a class

2011-04-01 Thread Armando Blancas
You'd have to not back-quote Region and then eval the reseult: user=> (def Country {'fields '((int x) (double y {reference Region}))}) #'user/Country user=> ((nth (nth (Country 'fields) 1) 2) 'reference) Region user=> (eval ((nth (nth (Country 'fields) 1) 2) 'reference) ) {fields ((datatype x) (da