diff --git a/piclib/built-in.scm b/piclib/built-in.scm index ddb175eb..e2648cd8 100644 --- a/piclib/built-in.scm +++ b/piclib/built-in.scm @@ -263,10 +263,14 @@ ,(let loop ((clauses clauses)) (if (null? clauses) #f - `(,(r 'if) (,(r 'or) - ,@(map (lambda (x) `(,(r 'eqv?) ,(r 'key) (,(r 'quote) ,x))) - (caar clauses))) - (begin ,@(cdar clauses)) + `(,(r 'if) ,(if (compare (r 'else) (caar clauses)) + '#t + `(,(r 'or) + ,@(map (lambda (x) `(,(r 'eqv?) ,(r 'key) (,(r 'quote) ,x))) + (caar clauses)))) + ,(if (compare (r '=>) (cadar clauses)) + `(,(r 'begin) ,@(cddar clauses)) + `(,(r 'begin) ,@(cdar clauses))) ,(loop (cdr clauses)))))))))) (define-syntax syntax-error