is_odd(X) :- 1 is mod(X,2).is_even(X) :- 0 is mod(X,2).
X=3. is_odd(X).
GNU Prolog 1.3.1 By Daniel Diaz Copyright (C) 1999-2009 Daniel Diaz X = 3 yes uncaught exception: error(instantiation_error,(is)/2)
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!