Changeset 4535
- Timestamp:
- 2016-06-18T11:28:33-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial-sugar.lisp
r4530 r4535 74 74 75 75 (defmethod update-instance-for-different-class :after ((old monom) (new monom-with-sugar) &key) 76 "Add sugar ."76 "Add sugar to a monom OLD." 77 77 (reinitialize-instance new :value (static-sugar new))) 78 78 79 79 80 80 (defmethod multiply-by :after ((self sugar) (other sugar)) 81 "By definition, sugar is additive under multiplication." 81 82 (with-slots (value) 82 83 self … … 84 85 other 85 86 (incf value other-value))) 86 self)87 88 (defmethod divide-by :after ((self sugar) (other sugar))89 (with-slots (value)90 self91 (with-slots ((other-value value))92 other93 (decf value other-value)))94 87 self) 95 88
Note:
See TracChangeset
for help on using the changeset viewer.