From: Kent Dahl Date: 2003-07-08T19:43:24+09:00 Subject: Re: "Apply" method to array? Thomas Link wrote: > > Hi, > > This is a newbie question: > > Is there a way to apply (as in Lisp, Scheme and the like) a method/block > to an array, so that the elements of the array become the arguments of > the method call. Something like: > > a(1,2,3) ~~ a.apply([1,2,3]) Like this? a(*[1,2,3]) * is used in argument list to unpack array contents to arguments (like here) or to pack arguments into an array,like in "def mymethod(*args)" -- (\[ Kent Dahl ]/)_ _~_ _____[ http://www.pvv.org/~kentda/ ]_____/~ ))\_student_/(( \__d L b__/ (pre-) Master of Science in Technology ) ( \__\_�|�_/__/ ) _)Industrial economics and technological management( \____/_�_\____/ (____engineering.discipline_=_Computer::Technology___)