Function: -find-index

-find-index is a byte-compiled function defined in dash.el.

Signature

(-find-index PRED LIST)

Documentation

Return the index of the first item satisfying PRED in LIST.

Return nil if no such item is found.

PRED is called with one argument, the current list element, until it returns non-nil, at which point the search terminates.

This function's anaphoric counterpart is --find-index.

See also: -first, -find-last-index.

View in manual

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -find-index (pred list)
  "Return the index of the first item satisfying PRED in LIST.
Return nil if no such item is found.

PRED is called with one argument, the current list element, until
it returns non-nil, at which point the search terminates.

This function's anaphoric counterpart is `--find-index'.

See also: `-first', `-find-last-index'."
  (declare (important-return-value t))
  (--find-index (funcall pred it) list))