MathGroup Archive 2003

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

Search the Archive

Re: Operator that Adds Arguments

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44841] Re: Operator that Adds Arguments
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 3 Dec 2003 04:24:31 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <bqb7ch$nu6$1@bob.news.rcn.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

NextOne[f_] := With[{i = Length[f]},
                                   
    Append[f, Last[f] /. {q_[a_Plus] :> q[Evaluate[a + Slot[i + 1]]],
          q_[a_] :> q[Evaluate[a + Slot[i + 1]]]}
      ]
    ] 

and

Nest[NextOne, {#1 &}, 4]

Regards
  Jens

Scott Guthery wrote:
> 
> I've got a recursion that adds an argument at each step
> and I'd like to say something like ...
> 
> L = Length[F]
> NextOne[F_] = Append[F, Function[F[[L]][#1, #2, ..., #L]+#[L+1]]]]
> 
> and have F[[L+1]] be a function of L+1 arguments.
> 
> Any suggestions?
> 
> Thanks for your help.
> 
> Cheers, Scott


  • Prev by Date: Re: here's one driving me mad!
  • Next by Date: Nested Functions
  • Previous by thread: Re: Operator that Adds Arguments
  • Next by thread: Re: Operator that Adds Arguments