Function: cl-subst-if
cl-subst-if is an autoloaded and byte-compiled function defined in
cl-seq.el.gz.
Signature
(cl-subst-if NEW PREDICATE TREE [KEYWORD VALUE]...)
Documentation
Substitute NEW for elements matching PREDICATE in TREE (non-destructively).
Return a copy of TREE with all matching elements replaced by NEW.
Keywords supported: :key
Aliases
subst-if (obsolete since 27.1)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-seq.el.gz
;;;###autoload
(defun cl-subst-if (new pred tree &rest cl-keys)
"Substitute NEW for elements matching PREDICATE in TREE (non-destructively).
Return a copy of TREE with all matching elements replaced by NEW.
\nKeywords supported: :key
\n(fn NEW PREDICATE TREE [KEYWORD VALUE]...)"
(declare (important-return-value t))
(apply #'cl-sublis (list (cons nil new)) tree :if pred cl-keys))