Re: [Scheme-reports] possible error in specification of guard
Per Bothner 22 Dec 2012 21:55 UTC
Is the following a correct translation of this guard clause:
(guard (var cond-clause ....) body)
First assume there is an else clause:
(call/cc (k)
(with-exception-handler
(lambda (var)
(k (cond cond-clause ...)))
(lambda () body)))
If there is no else clause:
(call/cc (k)
(with-exception-handler
(lambda (var)
(k (cond cond-clause ... (else (raise-continuable var)))))
(lambda () body)))
--
--Per Bothner
per@bothner.com http://per.bothner.com/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports