Skip to content

Instantly share code, notes, and snippets.

@stibear
Last active December 31, 2015 10:29
Show Gist options
  • Save stibear/7973506 to your computer and use it in GitHub Desktop.
Save stibear/7973506 to your computer and use it in GitHub Desktop.
(define-syntax aif
(ir-macro-transformer
(lambda (form inject compare?)
(let ((it (inject 'it))
(test (cadr form))
(then (caddr form))
(else (cadddr form)))
`(let ((,it ,test))
(if ,it ,then ,else))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment