From 03d0045f488976542f0aa744d1ddedd2ed287d6e Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <vu3rdd@gmail.com>
Date: Mon, 2 Jan 2012 14:27:24 +0530
Subject: [PATCH] - More functions like =, >, < from underlying scheme -
 renamed setup-environment to make-environment

---
 src/sicp/metacircular2.rkt | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/sicp/metacircular2.rkt b/src/sicp/metacircular2.rkt
index 06209d3..83d89fa 100644
--- a/src/sicp/metacircular2.rkt
+++ b/src/sicp/metacircular2.rkt
@@ -61,7 +61,7 @@
 
 (define (lookup-variable-value var env)
   (if (eq? env the-empty-environment)
-      (error "unbound variable:" var)
+      (error "unbound variable: " var)
       (let ([frame (first-frame env)])
         (let ([value (hash-ref frame var (lambda () (lookup-variable-value var (enclosing-environment env))))])
           (if (eq? value '*unassigned*)
@@ -70,7 +70,7 @@
 
 (define (set-variable-value! var val env)
   (if (eq? env the-empty-environment)
-      (error "unbound variable")
+      (error "unbound variable: " var)
       (let ([frame (first-frame env)])
         (if (hash-has-key? frame var)
             (hash-set! frame var val)
@@ -95,7 +95,9 @@
         (list '- -)
         (list '* *)
         (list '/ /)
-        (list '= =)))
+        (list '= =)
+        (list '> >)
+        (list '< <)))
 
 (define (primitive-procedure-names)
   (map car primitive-procedures))
@@ -109,7 +111,7 @@
    (primitive-implementation proc) args))
 
 ;; global env
-(define (setup-environment)
+(define (make-environment)
   (let ((initial-env
          (extend-environment (primitive-procedure-names)
                              (primitive-procedure-objects)
@@ -118,7 +120,7 @@
     (define-variable! 'false false initial-env)
     initial-env))
 
-(define the-global-environment (setup-environment))
+(define the-global-environment (make-environment))
 
 ;; application
 (define (list-of-values exps env)
-- 
2.45.2