Created
December 3, 2011 13:20
-
-
Save devnoo/1427105 to your computer and use it in GitHub Desktop.
Seven languages in seven days : 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(What, 'Robert C. Martin'). | |
What = 'Clean code' ? a | |
What = 'The clean coder' | |
no |
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('Clean code', 'Robert C. Martin'). | |
book('The clean coder', 'Robert C. Martin'). | |
book('Seven languages in seven weeks', 'Bruce A. Tate'). | |
book('Seven databases in seven weeks', 'Eric Redmond'). |
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
musician('Jimmy Hendrix'). | |
musician('Slash'). | |
musician('Janine Jansen'). | |
musician('Yo-Yo Ma'). | |
musician_instrument('Jimmy Hendrix', 'Guitar'). | |
musician_instrument('Slash', 'Guitar'). | |
musician_instrument('Janine Jansen', 'Violin'). | |
musician_instrument('Yo-Yo Ma', 'Violin'). | |
musician_genre('Jimmy Hendrix', 'funkrock'). | |
musician_genre('Yo-Yo Ma', 'classical'). | |
musician_genre('Slash', 'hardrock'). | |
musician_genre('Janine Jansen', 'classical'). |
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
?- | |
[musicians] | |
. | |
compiling /Users/job/projects/prolog/musicians.pl for byte code... | |
/Users/job/projects/prolog/musicians.pl compiled, 13 lines read - 1629 bytes written, 11 ms | |
(1 ms) yes | |
| ?- musician_instrument(Who, 'Guitar'). | |
Who = 'Jimmy Hendrix' ? a | |
Who = 'Slash' | |
no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment