close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 2747


Ignore:
Timestamp:
2015-06-20T19:05:01-07:00 (10 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r2746 r2747  
    144144
    145145
    146 (defmacro def-add/subtract-method (method-name
     146(defmacro def-add/subtract-method (add/subtract-method-name
    147147                                   (&key
    148148                                    (doc-string nil doc-string-supplied-p)
    149                                     (subtract-p nil)))
     149                                    (uminus-method-name nil uminus-method-name-supplied-p)))
    150150  "This macro avoids code duplication for two similar operations: ADD-TO and SUBTRACT-FROM."
    151151  `(defmethod ,method-name ((self poly) (other poly))
     
    159159           (setf termlist2 (sort termlist2 order1)
    160160                 order2 order1))
    161          (setf termlist1 (fast-add/subtract termlist1 termlist2 order1 #',method-name))))
     161         (setf termlist1 (fast-add/subtract
     162                          termlist1 termlist2 order1
     163                          #',add/subtract-method-name
     164                          ,@(when uminus-method-name-supplied-p
     165                                  (#'uminus-method-name))))))
    162166     self))
    163167
Note: See TracChangeset for help on using the changeset viewer.