Skip to content

Instantly share code, notes, and snippets.

@aymanosman
Created January 17, 2014 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aymanosman/8472013 to your computer and use it in GitHub Desktop.
Save aymanosman/8472013 to your computer and use it in GitHub Desktop.
;; In Clojure
(update-in {:a 1 :b false} [:b] not)
;; => {:a 1, :b true}
(update-in {:a 1 :b false} [b] not)
;; => CompilerException java.lang.RuntimeException: Unable to resolve symbol: b in this context, compiling:(NO_SOURCE_PATH:1:1)
;; In ClojureScript
(update-in {:a 1 :b false} [b] not)
;;=> {:a 1, :b false, nil true}
;; WARNING: Use of undeclared Var example.core/b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment