Monday, November 30, 2009

The simplest syntax-case

Have spent lots of time trying to understand syntax-case, yet there are no simple examples. At least until I came across this post.

Small change for Iron Scheme -




(define-syntax is-nil?
(lambda (stx)
(syntax-case stx ()
((_ ()) #t)
((_ stx) #f))))

No comments: