restore `when/block` behavior

pull/110/head
Matthew Butterick 8 years ago
parent 30823c839a
commit 35568a4ba5

@ -105,6 +105,11 @@
""))]))
(provide when/block) ; bw compat
(define-syntax-rule (when/block ARGS ...)
(when/splice ARGS ...))
(define-syntax (when/block stx)
(syntax-case stx ()
[(_ condition body ...)
#'(if condition (string-append*
(with-handlers ([exn:fail? (λ(exn) (error (format "within when/block, ~a" (exn-message exn))))])
(map ->string (list body ...))))
"")]))

Loading…
Cancel
Save