MathGroup Archive 2006

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

Search the Archive

Re: To apply a function to a List


The answer is:
 f/@list
(it´s called Map over list)

Apply in Mathematica just means replace head with f (f@@list).

If you want to map on a different level than the first use Map[f,list,level]

chlh


On Mon, 10 Apr 2006 02:31:17 -0400 (EDT)
 Francisco Javier <pacoga at ctv.es> wrote:
> Dear all,
> 
> 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?
> 
> Thanks.
> 
> -- 
> ----
> Francisco Javier García Capitán
> http://garciacapitan.auna.com
> 

-- Mag. Christoph Lhotka --
University of Vienna / Institute for Astronomy
mail. lhotka at astro.univie.ac.at


  • Prev by Date: Re: To apply a function to a List
  • Next by Date: Re: Stationarity testing of data
  • Previous by thread: Re: To apply a function to a List
  • Next by thread: Re: To apply a function to a List