From: Ramakrishnan Muthukrishnan Date: Wed, 6 Jul 2011 02:36:19 +0000 (+0530) Subject: solutions to 3.53 and 3.54 X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/bcase/architecture.txt?a=commitdiff_plain;h=33faa357d0c833542640f75cc3087dcc1d0609e9;p=sicp.git solutions to 3.53 and 3.54 --- diff --git a/src/sicp/ex3_53.rkt b/src/sicp/ex3_53.rkt new file mode 100644 index 0000000..1bfa479 --- /dev/null +++ b/src/sicp/ex3_53.rkt @@ -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 index 0000000..558e936 --- /dev/null +++ b/src/sicp/ex3_54.rkt @@ -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)))) + + +