Created
December 4, 2011 07:00
-
-
Save jomontanari/1429466 to your computer and use it in GitHub Desktop.
Prolog Day 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
book('Charlie and the chocolate factory', 'Roald Dahl'). | |
book('Boy', 'Roald Dahl'). | |
book('Oliver Twist', 'Charles Dickens'). | |
book('A Christmas Carol', 'Charles Dickens'). | |
book('1984', 'George Orwell'). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
['books-knowledge-base']. | |
book(What, 'Charles Dickens'). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plays(harry, guitar). | |
plays(jo, piano). | |
plays(rachel, drums). | |
plays(alex, guitar). | |
plays(alex, drums). | |
plays(chelsea, keyboard). | |
plays(matt, drums). | |
instrument_genre(guitar, alternative). | |
instrument_genre(drums, rock). | |
instrument_genre(keyboard, pop). | |
instrument_genre(piano, classical). | |
plays_genre(P,G) :- plays(P, I), instrument_genre(I, G). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
['music-knowledge-base']. | |
plays(Who, guitar). | |
plays_genre(Who, rock). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment