no.
well, if there is no shell predicate for increment/3 that will perform the operation, then call the actual increment/3 it is considered valid.
edit: suggests that you want to write a wrapper for foo(Arg1, Arg2, Arg3) so that you can pass the expression as the second argument. The wrapper will be:
efoo(Arg1, Expr, Arg3):- Arg2 is Expr, foo(Arg1, Arg2, Arg3)
if you want to do this a lot, you may need to distract this behavior:
eval_call(Predicate, Expressions):- maplist(evaluate, Expression, Args), call(Predicate,Args). evaluate(Expr, Arg):- Arg is Expr.
source share