Function: -map-indexed

-map-indexed is a byte-compiled function defined in dash.el.

Signature

(-map-indexed FN LIST)

Documentation

Apply FN to each index and item in LIST and return the list of results.

This is like -map, but FN takes two arguments: the index of the current element within LIST, and the element itself.

This function's anaphoric counterpart is --map-indexed.

For a side-effecting variant, see also -each-indexed.

View in manual

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -map-indexed (fn list)
  "Apply FN to each index and item in LIST and return the list of results.
This is like `-map', but FN takes two arguments: the index of the
current element within LIST, and the element itself.

This function's anaphoric counterpart is `--map-indexed'.

For a side-effecting variant, see also `-each-indexed'."
  (declare (important-return-value t))
  (--map-indexed (funcall fn it-index it) list))