clause/2 only works for dynamic predicates.

> On 27 Aug 2017, at 06:14, Curtis Hoffmann <[email protected]> wrote:
> 
> 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
> 
> _______________________________________________
> Users-prolog mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/users-prolog

-----------------------------------------------------------------
Paulo Moura
Logtalk developer

Email: <mailto:[email protected]>
Web:   <http://logtalk.org/>
-----------------------------------------------------------------





_______________________________________________
Users-prolog mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/users-prolog

Reply via email to