Function: cl-nsubst-if

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

Signature

(cl-nsubst-if NEW PREDICATE TREE [KEYWORD VALUE]...)

Documentation

Substitute NEW for elements matching PREDICATE in TREE (destructively).

Any element of TREE which matches is changed to NEW (via a call to setcar).

Keywords supported: :key

Aliases

nsubst-if (obsolete since 27.1)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-seq.el.gz
;;;###autoload
(defun cl-nsubst-if (cl-new cl-pred cl-tree &rest cl-keys)
  "Substitute NEW for elements matching PREDICATE in TREE (destructively).
Any element of TREE which matches is changed to NEW (via a call to `setcar').
\nKeywords supported:  :key
\n(fn NEW PREDICATE TREE [KEYWORD VALUE]...)"
  (apply 'cl-nsublis (list (cons nil cl-new)) cl-tree :if cl-pred cl-keys))