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 (new pred 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]...)"
(declare (important-return-value t))
(apply #'cl-nsublis (list (cons nil new)) tree :if pred cl-keys))