Closed adzaky15 closed 1 year ago
I think you can write a helper function that takes the environment into account, and then use it inside the calculator function.
There would be two solutions:
calc_aux (expr) (env)
and save the value of X
in the environment.X
exists, substitute all X
in e3, except for internal sigma.First one is more general solution, but second one is easier to implement.
I did it iterating all possible values of X when evaluating Sigma
expression. :)
@adzaky15 does the above comments solve your problem? Please close this issue if so.
Name: Akhdan Dzaky Maulana
Hello! I'm doing calculator.ml, and I got stuck on the Sigma(e1, e2, e3) -> part.
Should I add "env" map to the calculator? Or should I find a way to convert e3 into a function?