Changeset 3647 for branches/f4grobner
- Timestamp:
- 2015-09-05T21:04:51-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial.lisp
r3646 r3647 217 217 218 218 219 (defgeneric add-to (self other) 220 (:documentation "Add OTHER to SELF.") 221 (:method ((self number) (other number)) 222 (+ self other))) 223 224 (defgeneric subtract-from (self other) 225 (:documentation "Subtract OTHER from SELF.")) 226 227 219 228 (defmacro def-add/subtract-method (add/subtract-method-name 220 229 uminus-method-name 221 230 &optional 222 231 (doc-string nil doc-string-supplied-p)) 223 "This macro avoids code duplication for two similar operations: POLY-ADD-TO and POLY-SUBTRACT-FROM."232 "This macro avoids code duplication for two similar operations: ADD-TO and SUBTRACT-FROM." 224 233 `(defmethod ,add/subtract-method-name ((self poly) (other poly)) 225 234 ,@(when doc-string-supplied-p `(,doc-string))
Note:
See TracChangeset
for help on using the changeset viewer.