Changeset 4354
- Timestamp:
- 2016-06-06T17:39:43-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/ring.lisp
r4352 r4354 28 28 "MULTIPLY-BY" 29 29 "DIVIDE-BY" 30 "MULTIPLY" 31 "DIVIDE" 30 32 "UNARY-MINUS" 31 33 "UNARY-INVERSE" … … 104 106 (reduce #'multiply-by more-factors :initial-value (copy-instance factor)))) 105 107 108 109 (defgeneric divide (numerator &rest denominators) 110 (:documentation "Successively divides NUMERATOR by elements of DENOMINATORS. The operation 111 should not modify the NUMERATOR. Instead, a copy of factor should be made and returned as the value of this function.") 112 (:method ((numerator t) &rest denominators) 113 (cond ((endp denominators) 114 (unary-inverse (copy-instance numerator))) 115 (t (reduce #'divide-by denominators :initial-value (copy-instance numerator)))))) 116
Note:
See TracChangeset
for help on using the changeset viewer.