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
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
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