Help calling maxima functions from lisp



On Feb 12, 2008 1:12 PM, Daniel Cabrini Hauagge
<daniel.hauagge at gmail.com> wrote:

> What I'm trying to do is get this into lisp
>
>   exp_trans: scanmap(lambda([xx],
>       if mapatom(xx) or op(xx) # "^" then xx
>       else pow(args(xx)[1], args(xx)[2])), exp);

I think the easiest thing to do is make the above snippet into a function
and put it in a separate .mac file, load the .mac, and then call the
function via MFUNCALL.

------------ my_xform.mac ------------
my_xform (e) := scanmap (blah blah blah, e);


------- somewhere in my_f90.lisp -------
($load "my_xform.mac")
...
(setq my-new-expr (mfuncall '$my_xform my-expr))
...

HTH

Robert Dodier