Something like this:
increment(X, X2 is X + 1).
Is there any way to do it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
well, unless having a wrapper predicate for
increment/3that will perform the operation and then call the realincrement/3is considered valid.edit: lets assume that you want to write a wrapper for
foo(Arg1, Arg2, Arg3)so that you can pass an expression as a second argument. The wrapper would be:in case you want to do this a lot, you might want to abstract that behaviour: