nsubstitute
(nsubstitute new old list &key test key)
The destructive counterpart of substitute: rewrites the cars of list in place, replacing every element matching old with new. The comparison is eql by default; the optional :test keyword takes a function designator to use a different comparison, and the optional :key keyword takes a selector function applied to each element before the comparison. The list structure is reused, so the modification is visible through the original variable.