parent( mary, john ).parent( ann, mary ).female( mary).mother( X, Y) :- parent( X, Y), female( X).grandparent( X, Y) :- parent( X, Z), parent( Z, Y).
Standard input is empty
GNU Prolog 1.3.1 By Daniel Diaz Copyright (C) 1999-2009 Daniel Diaz
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!