Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active May 6, 2017 15:52
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 deque-blog/044b5796a4d6bca00d0013b70983d999 to your computer and use it in GitHub Desktop.
Save deque-blog/044b5796a4d6bca00d0013b70983d999 to your computer and use it in GitHub Desktop.
(def ^:const x 1) ;; Global constant x = 1
(def ^:const y 2) ;; Global constant y = 1
(add-m x y) ;; Trying to sum them at compile time
;; The compilation fails: we try to sum symbols, not numbers
ClassCastException clojure.lang.Symbol cannot be cast to java.lang.Number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment