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

Description

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.

Environment

None

Activity

Show:
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!.

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.

Assignee

David Nolen

Reporter

Mike Fikes

Labels

Approval

None

Patch

None

Priority

Trivial
Configure