From: Ramakrishnan Muthukrishnan Date: Sun, 17 Jun 2012 12:44:10 +0000 (+0530) Subject: Merge branch 'master' of github.com:vu3rdd/sicp X-Git-Url: https://git.rkrishnan.org/?p=sicp.git;a=commitdiff_plain;h=652ac0539adee469b08f7c7d285d3b134d7690d1;hp=16ffd75b36a5dbfbda3da703c2732f8f49208c11 Merge branch 'master' of github.com:vu3rdd/sicp --- diff --git a/src/sicp/eval-4.33.rkt b/src/sicp/eval-4.33.rkt index 67d821c..ffc7084 100644 --- a/src/sicp/eval-4.33.rkt +++ b/src/sicp/eval-4.33.rkt @@ -253,9 +253,9 @@ (define (quote->cons exp) ;(display (format "q->c: ~s~%" exp)) - (if (null? exp) - '() - (list 'cons (list 'quote (car exp)) (quote->cons (cdr exp))))) + (match exp + [(? null?) '()] + [_ `(cons (quote ,(car exp)) ,(quote->cons (cdr exp)))])) ;; eval (define (eval exp env)