Get a list of fields in the structure

How can I find which fields have a structure? 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 (: data: left: right) from a? I tried

(show a)

but this does not give any correct methods.

+3
source share
1 answer

I found the answer is simple

(keys a)

will get me.

+4
source

Source: https://habr.com/ru/post/1711928/


All Articles