Function: -remove-first

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

Signature

(-remove-first PRED LIST)

Documentation

Remove the first item from LIST for which PRED returns non-nil.

This is a non-destructive operation, but only the front of LIST leading up to the removed item is a copy; the rest is LIST's original tail. If no item is removed, then the result is a complete copy.

Alias: -reject-first.

This function's anaphoric counterpart is --remove-first.

See also -map-first, -remove-item, and -remove-last.

View in manual

Aliases

-reject-first

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -remove-first (pred list)
  "Remove the first item from LIST for which PRED returns non-nil.
This is a non-destructive operation, but only the front of LIST
leading up to the removed item is a copy; the rest is LIST's
original tail.  If no item is removed, then the result is a
complete copy.

Alias: `-reject-first'.

This function's anaphoric counterpart is `--remove-first'.

See also `-map-first', `-remove-item', and `-remove-last'."
  (declare (important-return-value t))
  (--remove-first (funcall pred it) list))