MathGroup Archive 1998

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

Search the Archive

RE: 2nd level pure function




Nathan wrote:
|
|I am having a problem with explicit functions.  I am trying to write a
|procedure that returns a function that returns a function.  I would
|like to have it return this as a pure function.  I am not sure how to
|do this.
|
|I will state this problem another way; I know that if f[a]=4+a, then as
|a pure function, f is analagous to Function[4 + Slot[1]].  I want to
|know how to represent f as a pure function when f[a][b]=a+b; |
|Nathan Linger
|Sophomore
|University of Illinois
|

This should help:

In[1]:=
f=Function[a,a+4];

In[2]:=
f[t]

Out[2]=
4+t

In[3]:=
g=Function[x,Sqrt[x+1]/f[x]];

In[4]:=
g[t]

Out[4]=
Sqrt[1 + t]/(4 + t)


Ted Ersek




  • Prev by Date: Mathematica frustrations...
  • Next by Date: Re: Sorting of Data Lists
  • Prev by thread: 2nd level pure function
  • Next by thread: Re: 2nd level pure function