Re: Lists in Learn Prolog Now
- From: Bart Demoen <bmd@xxxxxxxxxxxxxx>
- Date: Tue, 10 Jan 2006 10:38:59 +0100
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 .
- Follow-Ups:
- Re: Lists in Learn Prolog Now
- From: wooks
- Re: Lists in Learn Prolog Now
- References:
- Lists in Learn Prolog Now
- From: wooks
- Re: Lists in Learn Prolog Now
- From: Lawrence Oluyede
- Re: Lists in Learn Prolog Now
- From: wooks
- Re: Lists in Learn Prolog Now
- From: Bart Demoen
- Re: Lists in Learn Prolog Now
- From: wooks
- Lists in Learn Prolog Now
- Prev by Date: Re: Lists in Learn Prolog Now
- Next by Date: Generic term search in a list
- Previous by thread: Re: Lists in Learn Prolog Now
- Next by thread: Re: Lists in Learn Prolog Now
- Index(es):