Function: math-commutative-collect

math-commutative-collect is a byte-compiled function defined in calc-arith.el.gz.

Signature

(math-commutative-collect B NEG)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-arith.el.gz
(defun math-commutative-collect (b neg)
  (if (eq (car-safe b) '+)
      (progn
	(math-commutative-collect (nth 1 b) neg)
	(math-commutative-collect (nth 2 b) neg))
    (if (eq (car-safe b) '-)
	(progn
	  (math-commutative-collect (nth 1 b) neg)
	  (math-commutative-collect (nth 2 b) (not neg)))
      (setq math-com-bterms (cons (if neg (math-neg b) b) math-com-bterms)))))