Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Defining a new function in a function' topicStudent Support Forum > General > Archives > "Defining a new function in a function"

Next Comment >Help | Reply To Topic
Author Comment/Response
Simon Emil
10/27/12 08:58am

Hi!
It's a very simple problem that I have.
I'm trying to make a function, that includes another function, but it is never evaluated:

In[30]:= test[w_] := NestList[Function[x, w], 2, 4]

In[31]:= test[x^2]

Out[31]= {2, x^2, x^2, x^2, x^2}

In[29]:= NestList[Function[x, x^2], 2, 4]

Out[29]= {2, 4, 16, 256, 65536}

Please help me! I'm really frustrated

URL: ,

Subject (listing for 'Defining a new function in a function')
Author Date Posted
Defining a new function in a function Simon Emil 10/27/12 08:58am
Re: Defining a new function in a function Bill Simpson 10/29/12 12:15pm
Next Comment >Help | Reply To Topic