I'm trying to write a program which evaluates a function and does some operations on it.
dynamic evaluate/2.
begin :- writeln("Write your function"), read(Line),
assert((evaluate(X, Y) :- Y is Line)).
Since in SWI-prolog variable names are changed to _«number», when I try to call evaluate(), it doesn't work.
Any solutions to this?
Thanks.