Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2165
| From | Luci Ellis <luci@verbeia.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Converting a list to arguments for a function --- How? |
| Date | 2011-05-07 11:33 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <iq3an5$fil$1@smc.vnet.net> (permalink) |
| References | <iq0lpe$2q0$1@smc.vnet.net> |
On 2011-05-06 21:24:30 +1000, Virgil Stokes said:
> 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?
f @@ list
or Apply[f, list]
Hope that helps.
Regards
Luci
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Converting a list to arguments for a function --- How? Virgil Stokes <vs@it.uu.se> - 2011-05-06 11:24 +0000 Re: Converting a list to arguments for a function --- How? Stefan Salanski <wutchamacallit27@gmail.com> - 2011-05-07 11:31 +0000 Re: Converting a list to arguments for a function --- How? Luci Ellis <luci@verbeia.com> - 2011-05-07 11:33 +0000 Re: Converting a list to arguments for a function --- How? Michael Weyrauch <michael.weyrauch@gmx.de> - 2011-05-07 11:34 +0000 Re: Converting a list to arguments for a function --- How? Jingjing Wang <brightapple2008@gmail.com> - 2011-05-07 11:35 +0000 Re: Converting a list to arguments for a function --- How? Peter Breitfeld <phbrf@t-online.de> - 2011-05-07 11:35 +0000 Re: Converting a list to arguments for a function --- How? AES <siegman@stanford.edu> - 2011-05-07 11:29 +0000 Re: Converting a list to arguments for a function --- How? Yves Klett <yves.klett@googlemail.com> - 2011-05-07 11:29 +0000
csiph-web