define-syntax-case

I think the normal (define-syntax (... stx) (syntax-case stx () <em>cases</em>)) dance is a bit clunky, so here I present my first macro-defining macro:

(define-syntax-rule (define-syntax-case name cases)
  (define-syntax (name stx)
    (syntax-case stx () cases)))

It turns this slightly clunky definition:

(define-syntax (defun stx)
  (syntax-case stx ()
    ((_ name args . body)
     (stx-list? #'args)
     #`(define (name #,@#'args) #,@#'body))))

Into this succinct variant:

(define-syntax-case defun
  ((_ name args . body)
   (stx-list? #'args)
   #`(define (name #,@#'args) #,@#'body)))

(Not that anybody should write a defun macro.)

Update: Kawa already has this macro, with the same name!