Skip to content

Instantly share code, notes, and snippets.

@sriki77 sriki77/books.prolog
Created Dec 10, 2011

What would you like to do?
Prolog Day 1
#!/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).
#!/opt/local/bin/gprolog --consult-file
musician('Guitar','Brian Adams').
musician('Tabla','Ustad Zakhir Hussain').
musician('Guitar','Leny Kravitz').
musician('Keyboard','A.R. Rehman').
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.