Function: math-map-tree-rec
math-map-tree-rec is a byte-compiled function defined in
calc-ext.el.gz.
Signature
(math-map-tree-rec MMT-EXPR)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-ext.el.gz
(defun math-map-tree-rec (mmt-expr)
(or (= math-mt-many 0)
(let ((mmt-done nil)
mmt-nextval)
(while (not mmt-done)
(while (and (/= math-mt-many 0)
(setq mmt-nextval (funcall math-mt-func mmt-expr))
(not (equal mmt-expr mmt-nextval)))
(setq mmt-expr mmt-nextval
math-mt-many (if (> math-mt-many 0)
(1- math-mt-many)
(1+ math-mt-many))))
(if (or (Math-primp mmt-expr)
(<= math-mt-many 0))
(setq mmt-done t)
(setq mmt-nextval (cons (car mmt-expr)
(mapcar #'math-map-tree-rec
(cdr mmt-expr))))
(if (equal mmt-nextval mmt-expr)
(setq mmt-done t)
(setq mmt-expr mmt-nextval))))))
mmt-expr)