Przeglądaj źródła

Simplified term variable selection

Samuel W. Flint 8 lat temu
rodzic
commit
f3bee6262d
1 zmienionych plików z 1 dodań i 7 usunięć
  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