Читаю Practical Common Lisp и не могу понять один момент. Говорят, что аргументы в функцию передаются по значению (но ссылки - тоже значения), тогда почему если я в функции setf сделаю, то эффект не распространится на вызывающий код?
> In compiler-writer terms Common Lisp functions are "pass-by-value." However, the values that are passed are references to objects. This is similar to how Java and Python work.
you can assign a new value to a function parameter within the body of the function, and it will not affect the bindings created for another call to the same function.
But if the object passed to a function is mutable and you change it in the function, the changes will be visible to the caller since both the caller and the callee will be referencing the same object.