add substitution and differentiation

This commit is contained in:
2026-04-13 19:58:40 +03:00
parent 1fff529e83
commit 037c34b38e
3 changed files with 31 additions and 12 deletions

View File

@@ -50,7 +50,7 @@ module RubyAlgebra
@locals[command.lhs] = result
return "#{command.lhs} = #{result}"
when :subs
result = operand1.evaluate(operand2)
result = operand1.substitute(operand2)
@locals[command.lhs] = result
return "#{command.lhs} = #{result}"
end