Function: seq-map-indexed

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

Signature

(seq-map-indexed FUNCTION SEQUENCE)

Documentation

Return the result of applying FUNCTION to each element of SEQUENCE.

Unlike seq-map, FUNCTION takes two arguments: the element of the sequence, and its index within the sequence.

Other relevant functions are documented in the sequence group.

Shortdoc

;; sequence
(seq-map-indexed (lambda (a i) (cons i a)) '(a b c))
    => ((0 . a) (1 . b) (2 . c))

Source Code

;; Defined in ~/.emacs.d/elpa/transient-20260414.1009/transient.el
;; Could not find source code, showing raw function object.
#[514 "\300C\301\302\303#\"\207"
      [0 seq-map make-closure
	 #[257 "\300\301\242\"\301\211\242T\240\210\207"
	       [V0 V1]
	       4 "\n\n(fn ELT)"]]
      8
      ("/root/.emacs.d/elpa/seq-2.24/seq-25.elc" . 6185)]