-
-
Save Raynes/597962 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
user=> (defmacro plus [& numbers] (cons + numbers)) | |
#'user/plus | |
user=> (macroexpand '(plus 1 2 3)) | |
(#<core$_PLUS_ clojure.core$_PLUS_@b4c69> 1 2 3) | |
user=> (plus 1 2 3) | |
6 | |
user=> (defmacro plus [& numbers] (apply list + numbers)) | |
#'user/plus | |
user=> (macroexpand '(plus 1 2 3)) | |
(#<core$_PLUS_ clojure.core$_PLUS_@b4c69> 1 2 3) | |
user=> (plus 1 2 3) | |
6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment