]> git.rkrishnan.org Git - sicp.git/commitdiff
solutions to 4.18 and 4.19
authorRamakrishnan Muthukrishnan <vu3rdd@gmail.com>
Sun, 11 Dec 2011 19:40:39 +0000 (01:10 +0530)
committerRamakrishnan Muthukrishnan <vu3rdd@gmail.com>
Sun, 11 Dec 2011 19:40:39 +0000 (01:10 +0530)
src/sicp/ex4_18.rkt [new file with mode: 0644]
src/sicp/ex4_19.rkt [new file with mode: 0644]

diff --git a/src/sicp/ex4_18.rkt b/src/sicp/ex4_18.rkt
new file mode 100644 (file)
index 0000000..a730e34
--- /dev/null
@@ -0,0 +1,10 @@
+#lang racket
+
+#|
+
+It won't work in the new definition because the new let translates to a lambda and application
+of the lambda to the expressions. When we do that, evaluation of one expression needs the other.
+
+It will work with the definition given in the text because the expressions are inside the lambda.
+
+|#
\ No newline at end of file
diff --git a/src/sicp/ex4_19.rkt b/src/sicp/ex4_19.rkt
new file mode 100644 (file)
index 0000000..b04a549
--- /dev/null
@@ -0,0 +1,9 @@
+#lang racket
+
+#|
+
+I think Eva's scheme is the correct one but very hard to implement. One way to do it for non-function 
+definitions is to sort definitions in the order of least dependence on each other. If these definitions
+(again, non-function) are mutually dependent, an error should be flagged.
+
+|#
\ No newline at end of file