File: likes.pl

package info (click to toggle)
swi-prolog-packages 5.0.1-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 50,688 kB
  • ctags: 25,904
  • sloc: ansic: 195,096; perl: 91,425; cpp: 7,660; sh: 3,046; makefile: 2,750; yacc: 843; awk: 14; sed: 12
file content (23 lines) | stat: -rw-r--r-- 375 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
likes(mary,john).
likes(mary,potplants).
likes(mary,jane).
likes(mary,paul).
likes(mary,'Heartbreak High').
likes(john,mary).
likes(fidothedog,mary).
likes(mary,sunbathing).
likes(bugs,mary).
likes(john,'The X files').
likes(paul,mary).
likes(paul,sue).

person(mary).
person(john).
person(sue).
person(paul).
person(jane).

happy(X) :-
	person(X),
	likes(Y, X),
	person(Y).