Skip to content

Instantly share code, notes, and snippets.

@ktakashi
Created February 4, 2014 07:41
Show Gist options
  • Save ktakashi/8799591 to your computer and use it in GitHub Desktop.
Save ktakashi/8799591 to your computer and use it in GitHub Desktop.
Should this be an error?
(import (rnrs))
(define-syntax outer-define
(lambda (x)
(syntax-case x ()
((_ name def)
#'(define-syntax name
(lambda (xx)
(syntax-case xx ()
((_ val)
#'(define def val)))))))))
(outer-define defvar1 var1)
(defvar1 1)
(display var1) (newline)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment