[Maxima] apply(+,...), reduce, sum, ...
Joachim De Beule
joachim at arti.vub.ac.be
Thu May 15 10:05:53 CDT 2008
I have a number of related questions that keep popping up, probably because I
am still new to maxima and am missing something still.
For example, how do convert a list to a sum,
like from [a,b,c] to a+b+c?
My thoughts and troubles on that so far:
* apply(+,[a,b,c]) does not work because (unlike in lisp) + is an infix
operator requiring exactly two arguments.
* But I don't know of a reduce(+,[a,b,c]) that would do the trick as in lisp.
Is there something like that available?
* and I dont want to do something uggly like either
for e in [a,b,c] do res: res+e,
Mainly because sometimes maxima doesn't seem to expand such a sum
expression them. Can I force maxima to do that?
* I would be happy to do it in lisp but then without having to bother about
type conversions to much, and I don't know how to do that. Or is this not a
More information about the Maxima