Re: Function as an argument to a function
- To: mathgroup at smc.vnet.net
- Subject: [mg13839] Re: Function as an argument to a function
- From: Harald Giese <giese at dkrz.de>
- Date: Sat, 29 Aug 1998 04:41:16 -0400
- Organization: Institut fuer Meereskunde, Universitaet Hamburg
- References: <6s5msa$ccu@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Jani Eerikki Lakkakorpi wrote: > ... > I want to pass a function as an argument to a function I am developing. > For example: Myfunction[Exp[x]] > > I would like Myfunction to return the value of it's parameter function > when (for example) x=1. > Hi, Is it this what you meant? In[1]:= Myfunction[Exp[1]]:=Exp[1] In[2]:= Myfunction[Exp[8]] Out[2]= Myfunction[E^8] In[3]:= Myfunction[Exp[1]] Out[3]= E Regards, Harald -- Harald Giese Email: giese at dkrz.de Phone: +49 (0)40 4123 5796; Fax: +49 (0)40 5605724 Institut fuer Meereskunde der Universitaet Hamburg (Institute of Oceanography of the University of Hamburg) Troplowitzstrasse 7, D-22529 Hamburg