tags:

views:

66

answers:

1

How would I find what fields a struct has? For example, if i have the following:

(defstruct bintree :data :left :right)
(def a (struct bintree 0 nil nil))

how would i get a list,set, or vector of (:data :left :right) from a? I've tried

(show a)

but this gives no methods that look correct.

+3  A: 

I found the answer - a simple

(keys a)

will get me this.

Nathaniel Flath
You can accept your own answers
Christian Vest Hansen