Function: --map-indexed
--map-indexed is a macro defined in dash.el.
Signature
(--map-indexed FORM LIST)
Documentation
Eval FORM for each item in LIST and return the list of results.
Each element of LIST in turn is bound to it and its index
within LIST to it-index before evaluating FORM. This is like
--map, but additionally makes it-index available to FORM.
This is the anaphoric counterpart to -map-indexed.
Source Code
;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defmacro --map-indexed (form list)
"Eval FORM for each item in LIST and return the list of results.
Each element of LIST in turn is bound to `it' and its index
within LIST to `it-index' before evaluating FORM. This is like
`--map', but additionally makes `it-index' available to FORM.
This is the anaphoric counterpart to `-map-indexed'."
(declare (debug (form form)))
(let ((r (make-symbol "result")))
`(let (,r)
(--each ,list
(push ,form ,r))
(nreverse ,r))))