- Timestamp:
- 2015-09-05T09:45:21-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/ring.lisp
r3458 r3459 231 231 (defgeneric insert-item (self item)) 232 232 (defgeneric append-item (self item)) 233 234 235 #|236 ;; A stripped-down version of shallow copy237 ;; Source: http://stackoverflow.com/questions/11067899/is-there-a-generic-method-for-cloning-clos-objects238 (defun shallow-copy-object (original)239 (let* ((class (class-of original))240 (copy (allocate-instance class)))241 (dolist (slot (mapcar #'slot-definition-name (class-slots class)))242 (when (slot-boundp original slot)243 (setf (slot-value copy slot)244 (slot-value original slot))))245 copy))246 |#
Note:
See TracChangeset
for help on using the changeset viewer.