next up previous
Next: Prolog Arithmetic Queries Up: prolog Previous: Arithmetic Operators

Assignment

The predicate ``N is E'' will succeed whenever N is an unbound variable and E is an arithmetic expression.

Try:

X is 1+1, prime(X).