explicit list arguments?



try  

foo([a]):=  a[1]+a[2];
foo(r,s);

----- Original Message ----- 
From: "Fabrizio Caruso" <caruso at posso.dm.unipi.it>
To: <maxima at math.utexas.edu>
Sent: Wednesday, January 18, 2006 7:20 AM
Subject: explicit list arguments?


> Hi!
> 
> Is it possible to have explicit list
> arguments?
> 
> In other words something like:
> 
> foo([lhs,rhs]) := lhs+rhs;
> 
> Or if not possible some macro (depending on the args) on the fly like:
> 
> foo(lst) := with([lhs:lst[1],rhs:lst[2]], lhs+rhs);
> 
> Or any other easy way (possibly no lambda expressions)
> to avoid storing the arguments?
> 
>  Regards
> 
>  Fabrizio
> 
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>