Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
/* This file: * http://angg.twu.net/MAXIMA/traverse.mac.html * http://angg.twu.net/MAXIMA/traverse.mac * (find-angg "MAXIMA/traverse.mac") * Author: Eduardo Ochs <eduardoochs@gmail.com> * * (defun m () (interactive) (find-angg "MAXIMA/traverse.mac")) * See: (find-es "maxima" "op-and-args") * (find-es "maxima" "part-and-inpart") * (find-angg ".maxima/maxima-init.mac" "traverse") */ traverse1 : lambda([o, action], if action = 'op then op(o) elseif action = 0 then op(o) elseif action = 'args then args(o) else args(o)[action]); traverse(a, [b]) := xreduce(traverse1, b, a); /* * (eepitch-maxima) * (eepitch-kill) * (eepitch-maxima) ** (find-angg "MAXIMA/traverse.mac") load ("~/MAXIMA/traverse.mac"); ex1 : a+b^c; traverse(ex1); traverse(ex1, 0); traverse(ex1, 1); traverse(ex1, 2); traverse(ex1, 1, 0); traverse(ex1, 1, 'op); traverse(ex1, 1, 'args); traverse(ex1, 1, 1); traverse(ex1, 1, 2); */ /* * Local Variables: * mode: c * modes: (c-mode maxima-mode) * End: */