diff --git a/lib/srfi/2.sld b/lib/srfi/2.sld index d046f99b..d81d9e61 100644 --- a/lib/srfi/2.sld +++ b/lib/srfi/2.sld @@ -5,8 +5,10 @@ (begin (define-syntax and-let* (syntax-rules () + ((and-let* ()) + #t) ((and-let* () . body) - (begin #t . body)) + (let* () . body)) ((and-let* ((var expr))) expr) ((and-let* ((expr))) diff --git a/lib/srfi/2/test.sld b/lib/srfi/2/test.sld index e61cb199..6cc24775 100644 --- a/lib/srfi/2/test.sld +++ b/lib/srfi/2/test.sld @@ -42,4 +42,6 @@ (let ((x #f)) (and-let* (x (y (- x 1)) ((positive? y))) (/ x y)))) (test 3/2 (let ((x 3)) (and-let* (x (y (- x 1)) ((positive? y))) (/ x y)))) + (test 5 (and-let* () (define x 5) x)) + (test 6 (and-let* ((x 6)) (define y x) y)) (test-end))))