[plt-scheme] finally

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Dec 20 00:12:15 EST 2005

On Dec 20, Dave Herman wrote:
> (module try mzscheme
> 
>    (define-for-syntax (literal sym)
>      (lambda (stx-obj)
>        (eq? (syntax-object->datum stx-obj) sym)))
> 
>    (define-for-syntax finally? (literal 'finally))
> 
>    (define-for-syntax catch? (literal 'catch))
> 
>    (define-for-syntax (catch-clause? stx)
>      (syntax-case stx ()
>        [(catch . _)
>         (catch? #'catch)
>         #t]
>        [_ #f]))

(Looks like `syntax-case*' in the `try' macro would work better.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.