Re: Functional programming
- To: mathgroup at smc.vnet.net
- Subject: [mg39037] Re: Functional programming
- From: kzhang at flashmail.com (Kezhao Zhang)
- Date: Sat, 25 Jan 2003 01:25:12 -0500 (EST)
- References: <b0r496$4lo$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
The following will do it:
f[#, b]&/@a,
where a is an array of values and b is a fixed value.
Kezhao
"Zachary Turner" <_NOzturner0826SPAM_ at hotmail.com> wrote in message news:<b0r496$4lo$1 at smc.vnet.net>...
> I have a function f[a_,b_] defined some way. i want to fix one argument,
> and then generate an array of values where the other argument varies. How
> can I do this?
>
> For example, I want:
>
> {f[1, 4], f[2, 4], f[3, 4], f[4, 4]}
>
> Is there an easy way to do this?
>
> Thanks