From 871a4a8e2869b365b7bde907ec5762426dabfba0 Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <vu3rdd@gmail.com>
Date: Mon, 2 Jan 2012 21:21:40 +0530
Subject: [PATCH] test for named let

---
 src/sicp/metacircular2-test.rkt | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/sicp/metacircular2-test.rkt b/src/sicp/metacircular2-test.rkt
index a4c23ea..91ea502 100644
--- a/src/sicp/metacircular2-test.rkt
+++ b/src/sicp/metacircular2-test.rkt
@@ -62,7 +62,16 @@
                 (even? x)))
            env1)
      (check-equal? (eval '(f1 2) env1) true "internal definitions")
-     (check-equal? (eval '(f1 3) env1) false "internal definitions"))))
+     (check-equal? (eval '(f1 3) env1) false "internal definitions")
+     (eval '(define (fib n)
+              (let fib-iter ((a 1)
+                             (b 0)
+                             (count n))
+                (if (= count 0)
+                    b
+                    (fib-iter (+ a b) a (- count 1)))))
+           env1)
+     (check-equal? (eval '(fib 10) env1) 55 "named let"))))
 
 
 (run-tests metacircular2-tests)
\ No newline at end of file
-- 
2.45.2