Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Lists as arguments of functions (?obvious?)' topicStudent Support Forum > General > Archives > "Lists as arguments of functions (?obvious?)"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Aaron Honecker
11/13/98 10:18am

>
> Is it possible to apply a list of elements as arguments of a function without going through ''for'' and ''table''?
>
> eg: something that transforms {a,b,c} in f[a,b,c]
>
> If not is it possible to make this as a ''suffix'' form? (eg: {a,b,c} </?> f )
>
> If possible reply to mail address.
>
> Thanks

To get f[a,b,c] from {a,b,c} all you need to do is use the Apply command
For example, Apply[f,{a,b,c}], or in the shorthand notation f@@{1,2,3}
Both of these will return f[a,b,c].


URL: ,

Subject (listing for 'Lists as arguments of functions (?obvious?)')
Author Date Posted
Lists as arguments of functions (?obvious?) Pedro Alves 10/26/98 4:32pm
Re: Lists as arguments of functions (?obvious?) Forum Modera... 10/27/98 09:13am
Re: Lists as arguments of functions (?obvious?) Pedro Alves 10/27/98 12:07pm
Re: Lists as arguments of functions (?obvious?) Forum Modera... 10/27/98 12:18pm
Re: Lists as arguments of functions (?obvious?) Aaron Honecker 11/13/98 10:18am
< Previous CommentHelp | Reply To Comment | Reply To Topic