pull/2/head
Matthew Butterick 10 years ago
parent daf1edd1bf
commit f7e4dc7aec

@ -7,7 +7,8 @@
"list.rkt"
"misc.rkt"
"string.rkt"
"len.rkt")
"len.rkt"
"try.rkt")
(provide
(all-from-out
@ -17,4 +18,5 @@
"list.rkt"
"misc.rkt"
"string.rkt"
"len.rkt"))
"len.rkt"
"try.rkt"))

@ -0,0 +1,12 @@
#lang racket/base
(require (for-syntax racket/base))
(provide try)
;; Pythonlike try/except
(define-syntax (try stx)
(syntax-case stx ()
[(_ body ... (except tests ...))
#'(with-handlers (tests ...) body ...)]))
Loading…
Cancel
Save