Calling a function with list of arguments



Try

	apply(fun,xyz);


Viktor
 

-----Original Message-----
From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
On Behalf Of Neilen Marais
Sent: Thursday, December 07, 2006 12:16 PM
To: maxima at math.utexas.edu
Subject: Calling a function with list of arguments

Hi

Say I have a function defined as:

fun(x,y,z):= ...

but I have the values of x,y,z in a list xyz == [x,y,z]

how can I call fun(x,y,z) using xyz, short of going fun(xyz[1], xyz[2],
xyz[3])?  In Python I would call it as fun(*xyz). Does Maxima have an
equivalent representation?

Thanks
Neilen

-- 
you know its kind of tragic 
we live in the new world
but we've lost the magic
-- Battery 9 (www.battery9.co.za)
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima