From: Ramakrishnan Muthukrishnan Date: Sun, 10 Jul 2011 04:41:44 +0000 (+0530) Subject: solution to 3.60. Untested. Skipping 3.61 and 3.62. X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/file/URI:LIT:krugkidfnzsc4/frontends//%22%22.?a=commitdiff_plain;h=bde9529bb3ff94397ae103fa6ff993c31931a400;p=sicp.git solution to 3.60. Untested. Skipping 3.61 and 3.62. --- diff --git a/src/sicp/ex3_60.rkt b/src/sicp/ex3_60.rkt new file mode 100644 index 0000000..1110c28 --- /dev/null +++ b/src/sicp/ex3_60.rkt @@ -0,0 +1,10 @@ +#lang racket + +(define (mul-series s1 s2) + (cons-stream (* (stream-car s1) + (stream-car s2)) + (add-streams (scale-stream (stream-cdr s1) (stream-car s2)) + (add-streams + (scale-stream (stream-cdr s2) (stream-car s1)) + (mul-series (stream-cdr s1) + (stream-cdr s2)))))) \ No newline at end of file