@@ -128,7 +128,7 @@ function mul_numeric_args(args)
128128 (prod, sym_args)
129129end
130130
131- # Handles all lengths for ex.args
131+ # Handles `args` of all lengths
132132# Removes any 0's in a sum
133133function simplify (:: SymbolParameter{:+} , args)
134134 new_args = map (x -> simplify (x), filter (x -> x != 0 , args))
@@ -144,7 +144,7 @@ function simplify(::SymbolParameter{:+}, args)
144144 end
145145end
146146
147- # Assumes length(ex. args) == 3
147+ # Assumes length(args) == 3
148148# Removes any 0's in a subtraction
149149function simplify (:: SymbolParameter{:-} , args)
150150 new_args = map (x -> simplify (x), filter (x -> x != 0 , args))
@@ -158,13 +158,13 @@ function simplify(::SymbolParameter{:-}, args)
158158 end
159159end
160160
161- # Handles all lengths for ex.args
161+ # Handles `args` of all lengths
162162# Removes any 1's in a product
163163function simplify (:: SymbolParameter{:*} , args)
164164 new_args = map (x -> simplify (x), filter (x -> x != 1 , args))
165165 if length (new_args) == 0
166166 return 1
167- # Special Case: simplify(:(*x )) == x
167+ # Special Case: simplify(:(*(x) )) == x
168168 elseif length (new_args) == 1
169169 return new_args[1 ]
170170 # Special Case: simplify(:(x * y * z * 0)) == 0
@@ -177,7 +177,7 @@ function simplify(::SymbolParameter{:*}, args)
177177 end
178178end
179179
180- # Assumes length(ex. args) == 3
180+ # Assumes length(args) == 3
181181function simplify (:: SymbolParameter{:/} , args)
182182 new_args = map (x -> simplify (x), args)
183183 # Special Case: simplify(:(x / 1)) == x
@@ -191,7 +191,7 @@ function simplify(::SymbolParameter{:/}, args)
191191 end
192192end
193193
194- # Assumes length(ex. args) == 3
194+ # Assumes length(args) == 3
195195function simplify (:: SymbolParameter{:^} , args)
196196 new_args = map (x -> simplify (x), args)
197197 # Special Case: simplify(:(x ^ 0)) == 1
0 commit comments