Function: cl-position-if

cl-position-if is an autoloaded and byte-compiled function defined in cl-seq.el.gz.

Signature

(cl-position-if PREDICATE SEQ [KEYWORD VALUE]...)

Documentation

Find the first item satisfying PREDICATE in SEQ.

Return the index of the matching item, or nil if not found.

Keywords supported: :key :start :end :from-end

View in manual

Aliases

position-if (obsolete since 27.1)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-seq.el.gz
;;;###autoload
(defun cl-position-if (cl-pred cl-list &rest cl-keys)
  "Find the first item satisfying PREDICATE in SEQ.
Return the index of the matching item, or nil if not found.
\nKeywords supported:  :key :start :end :from-end
\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
  (apply 'cl-position nil cl-list :if cl-pred cl-keys))