Function: avl-tree-mapcar

avl-tree-mapcar is a byte-compiled function defined in avl-tree.el.gz.

Signature

(avl-tree-mapcar FUN TREE &optional REVERSE)

Documentation

Apply FUN to all elements in AVL TREE, and make a list of the results.

The function is applied and the list constructed in ascending order, or descending order if REVERSE is non-nil.

Note that if you don't care about the order in which FUN is applied, just that the resulting list is in the correct order, then

  (avl-tree-mapf function 'cons tree (not reverse))

is more efficient.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/avl-tree.el.gz
(defun avl-tree-mapcar (fun tree &optional reverse)
  "Apply FUN to all elements in AVL TREE, and make a list of the results.

The function is applied and the list constructed in ascending
order, or descending order if REVERSE is non-nil.

Note that if you don't care about the order in which FUN is
applied, just that the resulting list is in the correct order,
then

  (avl-tree-mapf function \\='cons tree (not reverse))

is more efficient."
  (nreverse (avl-tree-mapf fun 'cons tree reverse)))