- Timestamp:
- 2016-06-06T19:53:00-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/ring.lisp
r4374 r4376 102 102 should be returned upon every call.")) 103 103 104 (def unadd (summand &rest more-summands)104 (defgeneric add (summand &rest more-summands) 105 105 "Successively Adds to SUMMAND the elements of MORE-SUMMANDS. The first SUMMAND must not be destructively modified. 106 106 Instead, a copy of factor should be made and returned as the value of … … 108 108 (:method ((summand t) &rest more-summands) 109 109 (reduce #'add-to more-summands :initial-value (copy-instance summand)))) 110 111 (defgeneric subtract (minuend &rest subtrahends) 112 "Non-destructively subtract MINUEND and SUBTRAHENDS." 113 (:method ((minuend t) &rest subtrahends) 114 (cond ((endp subtrahends) (unary-minus (copy-instance minuend))) 115 (t (reduce #'subtract-from (copy-instance minuend) subtrahends))))) 110 116 111 117 (defgeneric multiply (factor &rest more-factors)
Note:
See TracChangeset
for help on using the changeset viewer.