Function: --reductions

--reductions is a macro defined in dash.el.

Signature

(--reductions FORM LIST)

Documentation

Return a list of FORM's intermediate reductions across LIST.

That is, a list of the intermediate values of the accumulator when --reduce (which see) is called with the same arguments. This is the anaphoric counterpart to -reductions.

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defmacro --reductions (form list)
  "Return a list of FORM's intermediate reductions across LIST.
That is, a list of the intermediate values of the accumulator
when `--reduce' (which see) is called with the same arguments.
This is the anaphoric counterpart to `-reductions'."
  (declare (debug (form form)))
  (let ((lv (make-symbol "list-value")))
    `(let ((,lv ,list))
       (if ,lv
           (--reductions-from ,form (car ,lv) (cdr ,lv))
         ;; Explicit nil binding pacifies lexical "variable left uninitialized"
         ;; warning.  See issue #377 and upstream https://bugs.gnu.org/47080.
         (let ((acc nil) (it nil))
           (ignore acc it)
           (list ,form))))))