--- /dev/null
+#lang racket
+
+(define (partial-sums s)
+ (define (partial-sums-iter sum stream)
+ (cons-stream (+ sum (stream-car stream))
+ (partial-sums-iter (+ sum (stream-car stream))
+ (stream-cdr stream))))
+ (partial-sums-iter 0 s))
+
+#|
+> (stream-ref (partial-sums (integers-starting-from 1)) 0)
+1
+> (stream-ref (partial-sums (integers-starting-from 1)) 1)
+3
+> (stream-ref (partial-sums (integers-starting-from 1)) 2)
+6
+> (stream-ref (partial-sums (integers-starting-from 1)) 3)
+10
+> (stream-ref (partial-sums (integers-starting-from 1)) 4)
+15
+|#
\ No newline at end of file
--- /dev/null
+#lang racket
+
+#|
+
+We do (n - 1) additions for the memo-proc based delay implementation.
+
+With the simple delay implementation, for a given n, it constructs the
+fib sequence:
+
+ fib (n) = fib (n-1) + fib (n-2)
+
+In our case, the number of additions for nth fib will be equal to the
+number of additions for the fib(n-1) and that for fib(n-2) + 1
+
+|#
\ No newline at end of file