Explorar o código

Simplified term variable selection

Samuel W. Flint %!s(int64=8) %!d(string=hai) anos
pai
achega
f3bee6262d
Modificáronse 1 ficheiros con 1 adicións e 7 borrados
  1. 1 7
      lisp-cas.org

+ 1 - 7
lisp-cas.org

@@ -842,13 +842,7 @@ As there are various forms of expressions, and to provide for simplification, th
 #+BEGIN_SRC lisp
   (defun term-variable (term)
     (when (classified-as-p term 'polynomial-term)
-      (classification-case term
-                           (power (second term))
-                           (multiplicative
-                            (if (listp (third term))
-                                (second (third term))
-                                (third term)))
-                           (numeric nil))))
+      (first (collect-variables term))))
 #+END_SRC
 
 *** TODO Get Power