Prolog newbie here. I don't know if Prolog's actually popular at any place, but I have a simple question.
Is it possible in Prolog to have a function evaluatefun like
Where (fun(arg1, arg2, Result) (put as first parameter to evaluatefun) is actually passed as a string/constant - and then fun (the function itself) is evaluated with parameters 50 and 10 as first two parameters.Code:fun(Cm, Meters, Result) :- Result is Cm * Meters. evaluatefun( (fun(arg1, arg2, Result)), 50, 10) :- ...
So (fun(arg1, arg2, Result) is a string/constant put as first parameter to evaluatefun, but the idea is to evaluate/call/run the passed string/constant ánd parameters, as the related existing function with parameters.
Bookmarks