home *** CD-ROM | disk | FTP | other *** search
Prolog Source | 1987-10-21 | 380 b | 24 lines |
- /* BAKTRAK.PRO */
-
- /* Uses backtracking to print
- all solutions to a query */
-
- PREDICATES
-
- country(symbol)
- print_countries
-
- CLAUSES
-
- country(england).
- country(france).
- country(germany).
- country(denmark).
-
- print_countries :- country(X),
- write(X),
- nl,
- fail.
-
- print_countries.