I'm feeling particularly stupid today. Have a method which specifies on numbers and arrays. When applied to accessors of an clos object, it works on arrays, but not on numbers. The question is why. I would think that passing by value would mean both fail. I would think that passing by reference, both would work. I'm missing something fundamental here.

the variable x is local to the method. When the method is called, (a pointer to) the argument object is copied into the x variable. There is no way for add-something to modify whatever the place the supplied value originates from is.

Because Lisp always passes references to objects (by value). Therefore, you can modify objects passed to you, but not the references to those objects. Your array method modifies the passed vector, which is an effect that is visible to the caller. Your number method modifies a locally bound reference to the passed number, not the number itself (which cannot be modified at all).

It looks like a bad approach. Why want you to do that? The special expressions places are different from a variable therefore this behaviour. Maybe I'll come up with a solution based on references, it needs create a reference datatype based on a referee, not an ultimate one.

Why was I asking? I am running some simulation models with different degrees of analysis. In the most simplistic model, the clos slots are merely ratios. Each more detailed level of analysis adds another dimension of data. Thus the slots of the clos objects in level 2 contain vectors, the slots in level 3 contain 2 dimensional arrays, the slots in level 4 contain 3 dimensional arrays. Generic methods allow me to call the same method names, but the data manipulation would be appropriate for the different levels of analysis. I actually started with levels 2-4, where everything worked,then was asked to create an introductory level without really thinking that the same process would not work if the slot only contained a number and not an object. The example posted was the simplest example I could create to show my lack of understanding.