Clamps Dictionary
with-shadowed-variable
Macro
(with-shadowed-variable (var) &rest body)
Shadow var in the local scope of body. var should be bound before entering with-shadowed-variable.
Arguments
var |
Symbol of variable to shadow |
body |
Body for the scope of the shadowing. |
Example
(defvar *myvar* 2) ; => *myvar* (defun return-myvar () *myvar*) (with-shadowed-variable (*myvar*) (setf *myvar* 10) (return-myvar)) ;; => 10 *myvar* ; => 2
Created: 2025-02-18 Di 12:58