;;; create binding for error
(define error #f)
;;; capture toplevel continuation
;;; assign a function to error, allowing a variable number of arguments to
;;; be passed
(call-with-current-continuation (lambda (k)
(set! error
(lambda error-arguments
(display ">>>> ERROR ")
(newline)
(k error-arguments)))
'done))
2 回答
好吧,根据这个:http://srfi.schemers.org/srfi-23/srfi-23.html,错误程序非常广泛,所以我认为你可以安全地使用它 .
这是我们的讲师给我们的实施: