Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2181
| From | "E. Martin-Serrano" <eMartinSerrano@telefonica.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Converting a list to arguments for a function --- How? |
| Date | 2011-05-07 11:29 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <iq3aeq$fbl$1@smc.vnet.net> (permalink) |
Is this what you want?
list = {1, 2, 3};
f[a_, b_, c_] := Print[a, ", ", b, ", ", c]
f[Sequence @@ list]
-----Mensaje original-----
De: Virgil Stokes [mailto:vs@it.uu.se]
Enviado el: viernes, 06 de mayo de 2011 13:25
Para: mathgroup@smc.vnet.net
Asunto: 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?
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Converting a list to arguments for a function --- How? "E. Martin-Serrano" <eMartinSerrano@telefonica.net> - 2011-05-07 11:29 +0000
csiph-web