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 3848 for branches


Ignore:
Timestamp:
2016-05-28T13:07:33-07:00 (8 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r3846 r3848  
    229229        (t (reduce #'multiply-2 factors :initial-value 1))))
    230230
    231 (defun divide (numerator &rest denominators)
    232   "Non-destructively divide object NUMERATOR by product of DENOMINATORS."
    233   (cond ((endp denominators)
    234          (divide-by 1 numerator))
    235         (t (divide-by (copy-instance numerator) (apply #'multiply denominators)))))
     231(defgeneric divide (numerator &rest denominators)
     232  (:documentation "Non-destructively divide object NUMERATOR by product of DENOMINATORS.")
     233  (:method ((numerator t) &rest denominators)
     234    (cond ((endp denominators)
     235           (divide-by 1 numerator))
     236          (t (divide-by (copy-instance numerator) (apply #'multiply denominators))))))
    236237
    237238(defgeneric divides-p (object1 object2)
Note: See TracChangeset for help on using the changeset viewer.