For Programmers: Free Programming Magazines  


Home > Archive > Prolog > January 2006 > Lists in Learn Prolog Now









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Lists in Learn Prolog Now
wooks

2006-01-10, 4:10 am

I cannot reproduce the result asserted in section 4.3 of Learn Prolog
Now for

a2b([a|Ta],[b|Tb]) :- a2b(Ta,Tb).


http://www.coli.uni-saarland.de/~kr...tml#sec.l4.rdal

which the book says should succeed for a2b([a,a,a],[b,b,b]) using
SWI-Prolog.

8 ?- listing(a2b).


a2b([a|A], [b|B]) :-
a2b(A, B).

Yes
9 ?- a2b([a,a,a],[b,b,b]).

No
10 ?-

Help please.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com