Re: recursive functions
From: Richard Gration (richard_at_zync.co.uk)
Date: 08/04/04
- Next message: Brian McCauley: "Re: join on space instead of comma"
- Previous message: Jim Gibson: "Re: Confused by sorting array elements"
- In reply to: Anno Siegel: "Re: recursive functions"
- Next in thread: Anno Siegel: "Re: recursive functions"
- Reply: Anno Siegel: "Re: recursive functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Brian McCauley: "Re: join on space instead of comma"
- Previous message: Jim Gibson: "Re: Confused by sorting array elements"
- In reply to: Anno Siegel: "Re: recursive functions"
- Next in thread: Anno Siegel: "Re: recursive functions"
- Reply: Anno Siegel: "Re: recursive functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]