Created
December 10, 2011 09:27
-
-
Save sriki77/1454869 to your computer and use it in GitHub Desktop.
Prolog Day 1
This file contains 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
#!/opt/local/bin/gprolog --consult-file | |
book('Seven langauges in seven days','Bruce tate'). | |
book('Beyond Java','Bruce tate'). | |
book('Bitter Java','Bruce tate'). | |
book('Spring Developer Note Book','Bruce tate'). | |
book('C programming language','Ritchie','Kernighan'). | |
book('Practice Of Programming','Kernighan','Pike'). | |
book('Unix Programming Environment','Pike','Kernighan'). | |
author(X,Y):- book(Y,X). | |
author(X,Y):- book(Y,_,X). | |
author(X,Y):- book(Y,X,_). | |
author('Bruce tate',W). | |
author('Pike',W). |
This file contains 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
#!/opt/local/bin/gprolog --consult-file | |
musician('Guitar','Brian Adams'). | |
musician('Tabla','Ustad Zakhir Hussain'). | |
musician('Guitar','Leny Kravitz'). | |
musician('Guitar','Bono'). | |
musician('Keyboard','A.R. Rehman'). | |
musician('Guitar',W). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment