In racket, we have defsubform
for subform, but defsubform
does not accept a form like bar
but only (bar ...)
Here's a (cleaned-up) implementation of defsubform
#lang racket
(require scribble/core
scribble/decode)
(define (into-blockquote s)
(make-nested-flow (make-style "leftindent" null)
(if (splice? s)
(decode-flow (splice-run s))
(list s))))
(define-syntax (defsubform stx)
(syntax-case stx ()
[(_ . rest) #'(into-blockquote (defform . rest))]))
This suggests that you can implement defsubidform
as follows:
(define-syntax (defsubidform stx)
(syntax-case stx ()
[(_ . rest) #'(into-blockquote (defidform . rest))]))