home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l217 / 2.ddi / EXAMPLES / CH05EX04.PRO < prev    next >
Encoding:
Prolog Source  |  1990-03-26  |  394 b   |  22 lines

  1. /*
  2.    Copyright (c) 1986, 90 by Prolog Development Center
  3. */
  4.    
  5. domains
  6.    name, thing = symbol
  7.  
  8. predicates
  9.    likes(name, thing)
  10.    reads(name)
  11.    is_inquisitive(name)
  12.  
  13. clauses
  14.    likes(john, wine).
  15.    likes(lance, skiing).
  16.    likes(Z, books) :-
  17.       reads(Z), is_inquisitive(Z).
  18.    likes(lance, books).
  19.    likes(lance, films).
  20.  
  21.    reads(john).
  22.    is_inquisitive(john).