Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: [?] apply a function to members of a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26785] Re: [?] apply a function to members of a list
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Wed, 24 Jan 2001 04:18:30 -0500 (EST)
  • References: <94gs7d$qvp@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

f /@ {1, 1.5, 7, 4, 3, 2001}

        {f[1], f[1.5], f[7], f[4], f[3], f[2001]}

This input is short for

Map[f, {1, 1.5, 7, 4, 3, 2001}]

You will find a lot more manipulation possibilite  by looking in the
HelpBrowser under  Map, MapAt, Apply ....

--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"9donco" <chindonco at iname.com> wrote in message
news:94gs7d$qvp at smc.vnet.net...
> hi all,
>
> I have a list of arbitrary numbers eg. alist={1, 1.5, 7, 4, 3, 2001}
> and a (user-define) function  f[]
>
> Is there a quick way/operation to apply f to indiviual
> elements in alist ? say, to produce:
>
> {f[1], f[1.5], f[7], f[4], f[3], f[2001]}
>
> Please help !
> thank you in advance
> 9DonCo
>
>
>




  • Prev by Date: Statistics functions in packages
  • Next by Date: New package (Humorap 1.0) apply to Radioprotection and Internal Dosimetry (ICRP 66 and 78)
  • Previous by thread: Re: [?] apply a function to members of a list
  • Next by thread: Re: [?] apply a function to members of a list