I have not yet seen the use of nested plists for such a data structure; it may be somewhat unusual. I'd rather expect a structure (defined with defstruct
) or class (defined with defclass
) representing nodes. An alternative for the case of (not too sparse) binary trees is the implementation as an array, where the root node is at index 0 and each node's children at (2 · i + 1) and (2 · i + 2).
If you insist on using plists, you will have to nest getf
s and write a setf
expander for nested getf
s.