@ -7,7 +7,8 @@
"list.rkt"
"misc.rkt"
"string.rkt"
"len.rkt")
"len.rkt"
"try.rkt")
(provide
(all-from-out
@ -17,4 +18,5 @@
"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 ...)]))