0

在球拍中,我们有defsubform子表单,但defsubform不接受类似bar但仅(bar ...)

4

1 回答 1

2

这是一个(清理后的)实现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))]))

这表明您可以defsubidform按如下方式实现:

(define-syntax (defsubidform stx)
  (syntax-case stx ()
    [(_ . rest) #'(into-blockquote (defidform . rest))]))
于 2021-08-25T13:13:32.777 回答