You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
beautiful-racket/beautiful-racket-demo/basic-demo/foo.rkt

9 lines
255 B
Racket

#lang br
(provide (rename-out [my-app #%app]))
(define-macro (my-app ID . ARGS)
(report caller-stx)
(if (number? (syntax->datum #'ID))
(with-pattern ([NEW-ID (report* #'ID (prefix-id "@" #'ID))])
#'(NEW-ID . ARGS))
#'(ID . ARGS)))