[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Newbie question regarding clause
From: |
Curtis Hoffmann |
Subject: |
Newbie question regarding clause |
Date: |
Sun, 27 Aug 2017 05:14:25 +0000 (UTC) |
I have the Clocksin and Mellish Programming in Prolog book, and I'm trying to
get past all the errors.
One of the programming examples is for a replacement of listing (p. 182).
list1(X) :-
clause(X, Y),
output_clause(X, Y), write('.'), nl, fail.
list1(X).
output_clause(X, true) :- !, write(X).
output_clause(X, Y) :- write((X :- Y)).
If I type the question ?- list1(list1).
I get no response back. Am I doing something wrong, or is there something about
clause that I don't understand?
I tried checking the archives and didn't see this question asked before.
Thank you in advance.
Curtis
- Newbie question regarding clause,
Curtis Hoffmann <=