Files
linguist/samples/Prolog/test-prolog.pl
2012-07-23 15:52:49 -05:00

13 lines
235 B
Prolog

/* Prolog test file */
male(john).
male(peter).
female(vick).
female(christie).
parents(john, peter, christie).
parents(vick, peter, christie).
/* X is a brother of Y */
brother(X, Y) :- male(X), parents(X, F, M), parents(Y, F, M).