lisp-macros

Common Lisp locally shadow function with same name

和自甴很熟 提交于 2020-05-29 09:41:53
问题 I've had this question more than once before. Generic Question Is it possible to transparently locally shadow a function f with a wrapper of it with the same name f ? I.e., how to locally have (f wrapped-args...) expand to (f args...)? Flet seems to let us do so, but has limitations, namely, the resulting wrapper is not setf-able. Is it possible to do so without resorting to flet? Ideally there would be a macro that lets us write the "wrapped" f calls and it expands the code to the original