|
@@ -289,7 +289,7 @@ Equality of constants is a bit different, and is checked as follows:
|
|
|
(slot-value expression 'name)))
|
|
|
#+END_SRC
|
|
|
|
|
|
-** WORKING Compound Types [2/7]
|
|
|
+** WORKING Compound Types [3/7]
|
|
|
:PROPERTIES:
|
|
|
:ID: a0d2eb19-8a1e-4dee-9b41-c454a49cacc4
|
|
|
:END:
|
|
@@ -369,7 +369,8 @@ Subtractions again, contain only a list of terms. However, unlike other types h
|
|
|
(slot-value expression 'terms))))
|
|
|
#+END_SRC
|
|
|
|
|
|
-*** WORKING Multiplications
|
|
|
+*** DONE Multiplications
|
|
|
+CLOSED: [2019-01-17 Thu 10:02]
|
|
|
:PROPERTIES:
|
|
|
:ID: 0c601f5c-a614-4c30-9107-220a5d45a334
|
|
|
:END:
|
|
@@ -390,6 +391,10 @@ Multiplication is one of the more frequently used expression types, and is, surp
|
|
|
(length (terms expression-b)))
|
|
|
(null (set-difference (terms expression-a) (terms expression-b)
|
|
|
:test #'eqal))))
|
|
|
+
|
|
|
+ (defmethod to-sexp ((expression <multiplication>) &optional resolve-constants-p)
|
|
|
+ `(* ,@(mapcar #'(lambda (exp) (to-sexp exp resolve-constants-p))
|
|
|
+ (slot-value expression 'terms))))
|
|
|
#+END_SRC
|
|
|
|
|
|
*** WORKING Divisions
|