我正在尝试创建一个宏,它允许我使用'thr'名称而不是'〜>'代码调用线程宏。我试过了:重命名线程代码的宏不起作用
(require threading)
(define-syntax-rule (thr body ...)
(require threading)
(~> body ...))
(thr " checking " string-trim println)
但它不起作用。错误是:
define-syntax-rule: too many forms in: (~> body)
我也试图与只有一个身体statment但仍无法正常工作:
(define-syntax-rule (thr2 body)
(require threading)
(~> body))
的错误仍然是一样的。如果我从宏中删除(需要线程),它会运行,但会给出输出:# –
rnso