MathGroup Archive 2006

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

Search the Archive

Re: To apply a function to a List

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65622] Re: To apply a function to a List
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Tue, 11 Apr 2006 04:04:34 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 4/10/06 at 2:31 AM, pacoga at ctv.es (Francisco Javier) wrote:

>Let f, l be a function and a list respectively. How can we do

>Table[f[list[[n]]],{n,1, Length[list]}]

>in another way?

Any of the following will work

Map[f,l]
f[#]&/@l
f/@l

or if f has the attribute Listable

f[l]
--
To reply via email subtract one hundred and four


  • Prev by Date: Help with functions
  • Next by Date: using Legend package
  • Previous by thread: Re: To apply a function to a List
  • Next by thread: Re: To apply a function to a List