Created
April 3, 2013 03:53
-
-
Save vito/5298326 to your computer and use it in GitHub Desktop.
atomy macro bootstrapping
This file contains hidden or 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
-- TODO: define 'nil' | |
-- TODO: define quasiquote code, use for the macro macro | |
-- TODO: make quasiquote in macro pattern implicit (e.g. macro(~a + ~b): '2) | |
define-method( | |
'define-macro | |
'define-method('expand, body, '_, pattern) | |
'_ | |
'pattern | |
'body) | |
define-macro( | |
'`(macro(~pattern): ~body), | |
'define-macro(pattern, body)) | |
macro(`1): '2 | |
p(1) -- => 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment