solutions to 3.53 and 3.54
authorRamakrishnan Muthukrishnan <vu3rdd@gmail.com>
Wed, 6 Jul 2011 02:36:19 +0000 (08:06 +0530)
committerRamakrishnan Muthukrishnan <vu3rdd@gmail.com>
Wed, 6 Jul 2011 02:36:19 +0000 (08:06 +0530)
src/sicp/ex3_53.rkt [new file with mode: 0644]
src/sicp/ex3_54.rkt [new file with mode: 0644]

diff --git a/src/sicp/ex3_53.rkt b/src/sicp/ex3_53.rkt
new file mode 100644 (file)
index 0000000..1bfa479
--- /dev/null
@@ -0,0 +1,10 @@
+#lang racket
+
+#|
+
+  1 2 4 8  16 32
+  1 2 4 8  16 32
+
+1 2 4 8 16 32 64 ....
+
+|#
\ No newline at end of file
diff --git a/src/sicp/ex3_54.rkt b/src/sicp/ex3_54.rkt
new file mode 100644 (file)
index 0000000..558e936
--- /dev/null
@@ -0,0 +1,9 @@
+#lang planet neil/sicp
+
+(define (mul-streams s1 s2)
+  (stream-map * s1 s2))
+
+(define factorial (cons-stream 1 (mul-streams factorial (integers-starting-from 2))))
+
+
+