Last active
May 7, 2017 09:45
-
-
Save deque-blog/c6dc4a447d52a36e5b78dc48ec522e25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro add-m | |
[a b] | |
`(constexpr add ~a ~b)) | |
(def ^:const x 1) | |
(def ^:const y 2) | |
;; Summing two global variables at compile time | |
(walk/macroexpand-all '(add-m x y)) | |
=> 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment