-
-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Labels
issue-type:documentationIssue pertaining to documentation moduleIssue pertaining to documentation moduleissue-type:enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested
Description
Hi,
I can't seem to get alter-var-root to alter any variable's root binding.
To reproduce, create a variable and alter its value. Even though the update happens, the variables root value remains the same as before the update
> basilisp repl
basilisp.user=> (def abc 7)
#'basilisp.user/abc
basilisp.user=> (alter-var-root #'abc (fn [x] (println :current x) (inc x)))
:current 7
nil
basilisp.user=> abc
7The same works in clojure as expected
> clj
Clojure 1.12.0
user=> (def abc 7)
#'user/abc
user=> (alter-var-root #'abc (fn [x] (println :current x) (inc x)))
:current 7
8
user=> abc
8Thanks
Metadata
Metadata
Assignees
Labels
issue-type:documentationIssue pertaining to documentation moduleIssue pertaining to documentation moduleissue-type:enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested