;;; SSet-Element structure. We allow an initial value of NIL to mean
;;; that no ordering has been assigned yet (although an ordering must
;;; be assigned before doing set operations.)
-(defstruct (sset-element (:constructor nil))
+(defstruct (sset-element (:constructor nil)
+ (:copier nil))
(number nil :type (or index null)))
-(defstruct (sset (:constructor make-sset ())
- (:copier nil))
+(defstruct (sset (:constructor make-sset ()))
(elements (list nil) :type list))
(defprinter (sset)
(elements :prin1 (cdr elements)))
(setf (sset-elements res) (copy-list (sset-elements set)))
res))
-;;; Perform the appropriate set operation on Set1 and Set2 by destructively
-;;; modifying Set1. We return true if Set1 was modified, false otherwise.
+;;; Perform the appropriate set operation on SET1 and SET2 by destructively
+;;; modifying SET1. We return true if SET1 was modified, false otherwise.
(declaim (ftype (function (sset sset) boolean) sset-union sset-intersection
sset-difference))
(defun sset-union (set1 set2)