aboutsummaryrefslogtreecommitdiff
path: root/samples/Prolog/test-prolog.pl
blob: aab83d5442ce1a0691e41a2942646f9baba6f0d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* 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).