Why does this function return a different value every time?

'(0 0 0) is a literal object, which is assumed to be a constant (albeit not protected from modification). So you’re effectively modifying the same object every time. To create different objects at each function call use (list 0 0 0).

So unless you know, what you’re doing, you should always use literal lists (like '(0 0 0)) only as constants.

Leave a Comment