Skip to content

Instantly share code, notes, and snippets.

@ktakashi
Created October 7, 2016 15:10
Show Gist options
  • Save ktakashi/4d6ef3ef7285a7c3c36f4ba0b5bb7887 to your computer and use it in GitHub Desktop.
Save ktakashi/4d6ef3ef7285a7c3c36f4ba0b5bb7887 to your computer and use it in GitHub Desktop.
List splicing via with-syntax
(import (rnrs))
(define-syntax foo
(lambda (x)
(syntax-case x ()
((k)
(with-syntax (((x ...) (datum->syntax #'k '(a b c))))
#'(begin (display '(x ...)) (newline)))))))
(foo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment