Function: MAKE-PUSHER

Documentation

Create a function which collects values as by PUSH.

Source

(defun make-pusher (&optional initial-value)
  "Create a function which collects values as by PUSH."
  (let ((value initial-value))
    (lambda (&rest items)
      (if items
          (progn
            (dolist (i items)
              (push i value))
            items)
          value))))
Source Context