From: Ramakrishnan Muthukrishnan Date: Mon, 2 Jan 2012 15:13:55 +0000 (+0530) Subject: additional check for let bindings X-Git-Url: https://git.rkrishnan.org/%5B/frontends/flags/cyclelanguage?a=commitdiff_plain;h=28041032337632a401c9a67c434c0e66556f2eb4;p=sicp.git additional check for let bindings --- diff --git a/src/sicp/metacircular2.rkt b/src/sicp/metacircular2.rkt index 83d89fa..26f9c12 100644 --- a/src/sicp/metacircular2.rkt +++ b/src/sicp/metacircular2.rkt @@ -176,7 +176,7 @@ ;; let (define (let->combination lexpr) - (match-let* ([`(let ,bindings ,body ..1) lexpr] + (match-let* ([`(let ,(? (lambda (x) (or (pair? x) (empty? x))) bindings) ,body ..1) lexpr] [`((,var ,val) ...) bindings]) `((lambda ,var ,@body) ,@val)))