MathGroup Archive 2007

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

Search the Archive

Re: Multiple nests?


On Oct 3, 2007, at 2:27 AM, Anolethron wrote:

> I'm using Mathematica 5.2 and i need to apply a function to a list
> several times. I'm using next for doing it once, but after this  
> process
> i need to apply a different function to the result of the previous  
> one,
> as in this naif example:
>
> no1[n_]:=Nest[function,list,n]	
> no2[m_]:=Nest[function2,result of the previous one,m]
> no3[l_]:=Nest[function3,resultofthepreviousone,l]
>
> Is there a command or a way to do this straight away?

Something like

Fold[Nest[#2[[1]],#1,#2[[2]]]&,Nest[function,list,n],{{function2,m}, 
{function3,l}}]

should work.

- Ssezi


  • Prev by Date: Re: Plot3D with NDSolve
  • Next by Date: Re: Bug ???
  • Previous by thread: Multiple nests?
  • Next by thread: Re: Multiple nests?