- Timestamp:
- 2016-05-31T12:11:19-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monom.lisp
r4009 r4010 615 615 (with-slots (exponents) 616 616 self 617 (cons '* 618 (mapcan #'(lambda (var power) 619 (cond ((= power 0) nil) 620 ((= power 1) (list var)) 621 (t (list `(expt ,var ,power))))) 622 vars (coerce exponents 'list))))) 617 (let ((m (mapcan #'(lambda (var power) 618 (cond ((= power 0) nil) 619 ((= power 1) (list var)) 620 (t (list `(expt ,var ,power))))) 621 vars (coerce exponents 'list)))) 622 (cond ((endp (cdr m)) 623 (car m)) 624 (t 625 (cons '* m)))))) 623 626 (:method ((self term) &optional vars) 624 627 "Convert a term SELF to infix form, using variable VARS to build the representation." … … 628 631 (let ((m (call-next-method))) 629 632 (cond ((= coeff 1) m) 630 (t (setf (cdr m) (cons coeff (cdr m))))) 633 ((eql (car m) '*) 634 (setf (cdr m) (cons coeff (cdr m)))) 635 (t 636 (list* '* coeff m))) 631 637 m))))
Note:
See TracChangeset
for help on using the changeset viewer.