Changeset 4379 for branches/f4grobner
- Timestamp:
- 2016-06-06T19:55:26-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/ring.lisp
r4378 r4379 103 103 104 104 (defgeneric add (summand &rest more-summands) 105 "Successively Adds to SUMMAND the elements of MORE-SUMMANDS. The first SUMMAND must not be destructively modified. 106 Instead, a copy of factor should be made and returned as the value of 107 this function." 105 (:documentation "Successively adds to SUMMAND the elements of 106 MORE-SUMMANDS, using ADD-TO. The first SUMMAND must not be 107 destructively modified. Instead, a copy of factor should be made and 108 returned as the value of this function.") 108 109 (:method ((summand t) &rest more-summands) 109 110 (reduce #'add-to more-summands :initial-value (copy-instance summand)))) 110 111 111 112 (defgeneric subtract (minuend &rest subtrahends) 112 "Successively subtracts SUBTRAHENDS from MINUEND, using SUBTRACT-FROM. MINUEND. must not be destructively modified. 113 (:documentation "Successively subtracts SUBTRAHENDS from MINUEND, 114 using SUBTRACT-FROM. MINUEND. must not be destructively modified. 113 115 Instead, a copy of factor should be made and returned as the value of 114 this function." 116 this function.") 115 117 (:method ((minuend t) &rest subtrahends) 116 118 (cond ((endp subtrahends) (unary-minus (copy-instance minuend)))
Note:
See TracChangeset
for help on using the changeset viewer.