The defstruct construct declares a new user-defined data type which has a fixed number of named components. It also creates structure constructor.
The following example declares a Lisp structure with the symbol point and three slots referenced by the symbols x, y, and z. Here constructor is named make-point.
(defstruct point x y z) ; define structure (defvar my-point) ; define var (setf my-point (make-point :x 3 :y 4 :z 12)) ; set value of slots of var (point-x my-point) ; acces to slots
- s# macro