home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l210 / 1.ddi / EXAMPLES.ARC / CH05EX02.PRO < prev    next >
Encoding:
Prolog Source  |  1988-06-21  |  387 b   |  21 lines

  1. /*
  2.    Turbo Prolog 2.0 Chapter 5, Example Program 02
  3.    
  4.    Copyright (c) 1986, 88 by Borland International, Inc
  5.    
  6. */
  7.    
  8. predicates
  9.    likes(symbol,symbol)
  10.    tastes(symbol,symbol)
  11.    food(symbol)
  12.    
  13. clauses
  14.    likes(bill, X) :-
  15.       food(X), tastes(X, good).
  16.  
  17.    tastes(pizza, good).
  18.    tastes(brussels_sprouts, bad).
  19.  
  20.    food(brussels_sprouts).
  21.    food(pizza).