Docstring / parameter consistency for swap!, reset!, swap-vals!, and reset-vals!


In Clojure, the parameter and docstring for swap!, swap-vals!, reset!, and reset-vals! consistently refer to atom and newval, but in ClojureScript this is not true.

In ClojureScript, a is used as a parameter name instead of atom, and for the reset functions, the parameter is named new-value, while the docstring refers to newval ( and in ClojureScript, there is one reference to the parameter as new-value in at the end of the reset! docstring).

Suggest changing the parameters and docstrings to be consistent, matching those in Clojure.




Mike Fikes
November 8, 2018, 10:29 PM

CLJS-2965.patch LGTM and its expansion to cover compare-and-set! is a good catch IMHO. Passes in CI.

Hyunwoo Nam
November 8, 2018, 1:51 PM

Thanks for keep throwing low hanging fruits. =D

Also included similar inconsistency fix for compare-and-set!.

Your pinned fields
Click on the next to a field label to start pinning.


David Nolen


Mike Fikes