MathGroup Archive 2003

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

Search the Archive

Re: Functional programming

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39053] Re: [mg39015] Functional programming
  • From: Ken Levasseur <klevasseur at mac.com>
  • Date: Sun, 26 Jan 2003 05:22:53 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Map[f[#,4]&,Range[1,4]]
or
f[#,4]&/@Range[1,4]

Ken Levasseur
Math, Sci.
UMass Lowell

> From: "Zachary Turner" <_NOzturner0826SPAM_ at hotmail.com>
To: mathgroup at smc.vnet.net
> Date: Fri, 24 Jan 2003 05:07:26 -0500 (EST)
> To: mathgroup at smc.vnet.net
> Subject: [mg39053] [mg39015] Functional programming
> 
> 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
> 
> 



  • Prev by Date: Maximizing the BasicInput.nb palette
  • Next by Date: Re: Matrices Over Z/NZ
  • Previous by thread: Re: Functional programming
  • Next by thread: Re: Functional programming