-----maxima-bounces at math.utexas.edu wrote: -----
> If I understand correctly, by "replace function tags" you mean to
> transform stuff like ((MPLUS) 1 2 3) to (+ 1 2 3). Right?
Although mostly a toy, to_cl is a tiny easy to modify Maxima to CL translator.
Every once in awhile, I find some useful way to modify it. As Robert and others
suggested, you should try using the Maxima translator--nevertheless:
(%i10) load(tocl)$
(%i13) to_cl(u + n / k)$
(+ U (/ N K))
(%i14) to_cl('(x : x + 1, x * x))$
(PROGN (SETQ X (+ 1 X)) (EXPT X 2))
(%i16) to_cl('(f(a,b,c) := (a : a +1, a + b*c)))$
(DEFUN $F (A B C) (PROGN (SETQ A (+ A 1)) (+ A (* B C))))
(%i17) to_cl('block([acc : 0], for k : 1 thru 100 do acc : acc + 1.0/k, acc))$
(LET ((ACC 0))
(DO ((K 1 (INCF K 1))) ((> K 100) '$DONE)
(SETQ ACC (+ ACC (* 1.0 (EXPT K -1)))))
ACC)
--bw