Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider allowing set! on any var for compatibility with CLJS #136

Closed
borkdude opened this issue Feb 23, 2022 · 3 comments
Closed

Consider allowing set! on any var for compatibility with CLJS #136

borkdude opened this issue Feb 23, 2022 · 3 comments

Comments

@borkdude
Copy link
Collaborator

(def x 1)
(set! x 2)
@borkdude
Copy link
Collaborator Author

The current way to do this is:

(alter-var-root! #'x (constantly 2))

@logseq-cldwalker
Copy link
Contributor

I encountered this recently and alter-var-root worked as a workaround. The only downside is introducing a reader conditional for this

@logseq-cldwalker
Copy link
Contributor

Confirm this works in latest nbb. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants