Re: Lists in Learn Prolog Now



wooks wrote:

a2b([a|A], [b|B]) :-
       a2b([], []).
a2b([a|A], [b|B]) :-
       a2b(A, B).
[...]
I have a much better than average understanding of recursion

then you should understand that having only recursive clauses, queries to this predicate can only fail or loop infinitely; that holds in logic just as in a functional language.

Cheers

Bart Demoen
.