[CM] A question regarding structures

cristopher pierson ewing cewing@u.washington.edu
Sat, 19 Oct 2002 17:50:57 -0700 (PDT)


I have a question about structures in Common Lisp.

Given a structure called joe, whose slots are z y and z, is there a way to
obtain a list of the slots in joe?

I mean to say, if I know there is a structure named joe, and I wish to
know what slots is has, can I find that information using a function of
some sort?

so
(deftruct joe x y z)
gives the structure,
and
(slots joe) ;;my imaginary function
would return
(x y z)

Thanks,

Cris


********************************
Cris Ewing
CARTAH Assistant
University of Washington
Home Phone: (206) 365-3413
E-mail: cewing@u.washington.edu
*******************************