Re: Thinking Recursion

From: Bart Demoen (bmd_at_cs.kuleuven.ac.be)
Date: 03/29/05


Date: Tue, 29 Mar 2005 12:55:56 +0200

Torkel Franzen wrote:

> append/3 is a direct translation into Prolog of the (only
> reasonable) recursive definition of list concatenation:
>
> []+L=L
> [X|L1]+L=[X|L1+L]
>
> which is how I present it to beginners.

Do beginners grok this better than a Prolog definition
of append/3 ? And if so, why/how/... in your opinion ?
Do these beginners know already about things like recurrence
relations (or recurrence equations, or difference equations)
at the moment you show this to them ? Do they know about
induction (maybe specific instances like transitive closure)
or fixed point computations ...
I am just trying to find out whether the people who had no
(or little) problem with recursive functions or predicates on
first sight have something in common.

Cheers

Bart Demoen



Relevant Pages

  • Re: Thinking Recursion
    ... append/3 is a direct translation into Prolog of the (only ... reasonable) recursive definition of list concatenation: ... which is how I present it to beginners. ...
    (comp.lang.prolog)
  • Re: Thinking Recursion
    ... > reasonable) recursive definition of list concatenation: ... > which is how I present it to beginners ... Prolog predicate definition be expressed as ...
    (comp.lang.prolog)