Function: -first

-first is a byte-compiled function defined in dash.el.

Signature

(-first PRED LIST)

Documentation

Return the first item in LIST for which PRED returns non-nil.

Return nil if no such element is found.

To get the first item in the list no questions asked, use -first-item.

Alias: -find.

This function's anaphoric counterpart is --first.

View in manual

Aliases

-find

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -first (pred list)
  "Return the first item in LIST for which PRED returns non-nil.
Return nil if no such element is found.

To get the first item in the list no questions asked,
use `-first-item'.

Alias: `-find'.

This function's anaphoric counterpart is `--first'."
  (declare (important-return-value t))
  (--first (funcall pred it) list))