Re: recursive functions

From: Richard Gration (richard_at_zync.co.uk)
Date: 08/04/04


Date: Wed, 04 Aug 2004 17:43:18 +0100

In article <cer0qa$4um$1@mamenchi.zrz.TU-Berlin.DE>, "Anno Siegel"
<anno4000@lublin.zrz.tu-berlin.de> wrote:

> Richard Gration <richard@zync.co.uk> wrote in comp.lang.perl.misc:
>> The absolute classic example of a recursive algorithm is the factorial
>> function. ...
>
> Classic only in the sense of mythology. Nothing about the factorial
> invites a recursive algorithm, and the recursive implementation has no
> advantages over an iterative one.
> Anno

But you have to agree it illustrates the concept of recursion well. A
computer is not the ideal tool to convert celsius to fahrenheit either,
yet I have written a few programs to do just that when learning a
language. :-)

Rich