diff --git a/lib/init-7.scm b/lib/init-7.scm index 4725d972..44d6f8ed 100644 --- a/lib/init-7.scm +++ b/lib/init-7.scm @@ -869,14 +869,11 @@ (define ellipsis (if ellipsis-specified? (cadr expr) (rename '...))) (define lits (if ellipsis-specified? (car (cddr expr)) (cadr expr))) (define forms (if ellipsis-specified? (cdr (cddr expr)) (cddr expr))) + (define full-match? (any (lambda (x) (not (pair? (car x)))) forms)) (define (next-symbol s) (set! count (+ count 1)) (rename (string->symbol (string-append s (%number->string count))))) (define (expand-pattern pat tmpl) - (define full-match? - (or (not (pair? pat)) - (and (compare (car pat) (rename 'set!)) - (any (lambda (x) (compare x (rename 'set!))) lits)))) (let lp ((p (if full-match? pat (cdr pat))) (x (if full-match? _expr (list _cdr _expr))) (dim 0)