Function: avl-tree--stack-repopulate

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

Signature

(avl-tree--stack-repopulate STACK)

Documentation

Recursively push children of STACK onto the front.

This pushes the children of the node at the head of STACK onto the front of STACK, until a leaf node is reached.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/avl-tree.el.gz
(defun avl-tree--stack-repopulate (stack)
  "Recursively push children of STACK onto the front.
This pushes the children of the node at the head of STACK onto
the front of STACK, until a leaf node is reached."
  (let ((node (car (avl-tree--stack-store stack)))
	(dir (if (avl-tree--stack-reverse stack) 1 0)))
    (when node  ; check for empty stack
      (while (setq node (avl-tree--node-branch node dir))
	(push node (avl-tree--stack-store stack))))))