Created
March 7, 2012 06:07
-
-
Save nyuichi/1991369 to your computer and use it in GitHub Desktop.
clojureのマクロ展開
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
(ns hello | |
(:gen-class)) | |
(def x (atom 2)) | |
(defmacro test-macro [] | |
(println @x)) | |
(swap! x inc) | |
(test-macro) | |
; コンパイルした結果 | |
; user=> (compile 'hello) | |
; 3 | |
; hello | |
; user=> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment