RE: 2nd level pure function
- To: mathgroup@smc.vnet.net
- Subject: [mg11061] RE: [mg10948] 2nd level pure function
- From: Ersek_Ted%PAX1A@mr.nawcad.navy.mil
- Date: Wed, 18 Feb 1998 20:32:15 -0500
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