MathGroup Archive 2011

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

Search the Archive

Re: Converting a list to arguments for a function --- How?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118675] Re: Converting a list to arguments for a function --- How?
  • From: "Yasvir Tesiram, PhD" <Yasvir-Tesiram at omrf.org>
  • Date: Sat, 7 May 2011 07:30:47 -0400 (EDT)

Hello,
Apply[f, list] will do what you want. Or f@@list is the same thing.
Yas


-----Original Message-----
From: Virgil Stokes [mailto:vs at it.uu.se]
Sent: Fri 5/6/2011 6:24 AM
To: mathgroup at smc.vnet.net
Subject: [mg118675] Converting a list to arguments for a function --- How?

Suppose I have a list,

list == {4,1,1}

and I wish to use it as follows

f[4,1,1]

Is there a simple way (without looping through the elements list) to transfer
the elements of list to the arguments for f?


  • Prev by Date: How to use NIntegrate to integrate a purely numeric vector function?
  • Next by Date: Re: Converting a list to arguments for a function --- How?
  • Previous by thread: Re: Converting a list to arguments for a function --- How?
  • Next by thread: Re: Converting a list to arguments for a function --- How?