Skip to content

Commit

Permalink
exercises of the section 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Jul 2, 2011
1 parent 315fe6f commit c60baa7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions chapter01/exercise-1.6.2.pl
@@ -0,0 +1,9 @@
/* With GEO.PL, which is faster to compute,
'?- located_in(austin, north_america).' or '?- located_in(austin, usa).'? Why? */

/*
'?- located_in(austin, north_america).' needs to solve '?- located_in(austin, usa).',
so it will be slower.
*/
12 changes: 12 additions & 0 deletions chapter01/exercise-1.6.3.pl
@@ -0,0 +1,12 @@
/* Without using the computer, predict the order in which the Prolog system will find
the various solutions to the query '?- located_in(X, usa).' Then use the computer to
verify your prediction. */

/*
X = atlanta ;
X = houston ;
X = austin ;
false.
*/

0 comments on commit c60baa7

Please sign in to comment.