MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Pure recursive functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38427] Re: Pure recursive functions
  • From: "Albert REINER" <Use-Author-Address-Header at [127.1]>
  • Date: Sat, 14 Dec 2002 03:20:49 -0500 (EST)
  • Organization: mail2news@nym.alias.net
  • References: <at9de0$q4r$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On Thu, Dec 12, 2002 at 07:21:36AM +0000, Niall Palfreyman wrote:
> The issue is: how do I create a pure recursive function? Normally when
> creating a recursive function I use the name of the function to perform
> the recursive call:
> 
> fact[n_] :=
>   If[n == 1, 1, n fact[n - 1]]
> 

If[#>1,# #0[#-1],1]&

Regards,

Albert.


  • Prev by Date: Problem with Legend
  • Next by Date: Re: Programming language difficulties.
  • Previous by thread: RE: Pure recursive functions
  • Next by thread: RE: Pure recursive functions