Skip to content

Instantly share code, notes, and snippets.

@vito
Created April 3, 2013 03:53
Show Gist options
  • Save vito/5298326 to your computer and use it in GitHub Desktop.
Save vito/5298326 to your computer and use it in GitHub Desktop.
atomy macro bootstrapping
-- 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