Take the 2-minute tour ×

SICP Chapter 3.5.3 http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-24.html#%_sec_3.5.3

In section Streams as signals, SICP gives an audio-visual explanation of Implicit style of definition -- by feedback loop. But I want to know how to exactly understand the diagram? What's the real advantage and is there any background knowledge?

Take another example, not in Scheme, but in Haskell:

fibs = fix (scanl (+) 0 . (1:))
fibs = fix ((0:) . scanl (+) 1)

We can also draw the signal-flow diagram for either. How can we take advantage of these graphs?

Thanks for advice and information!

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

For a real audiovisual explanation of the diagrams, why don't you take a look at the accompanying videos? They're in here, lectures 6A and 6B.

As for the "real advantage" of the diagrams, well, they're a visual representation of stream processing, no "background knowledge" is needed for understanding them, AFAIK the notation for these diagrams is part of the idiosyncrasies of SICP, by reading the book and watching the videos you'll know all there's to know about them.

share|improve this answer
Thanks. I'm just reading the SICP but I might not have got the clear picture of this type of diagram. I can understand the meaning of the picture, but when I try to read a diagram (such as the ones for those Haskell codes), I find that I can't immediately know that it's a diagram for Fibnonacci sequence. That's why I wonder the way of clearly understand –  Frank Science Apr 2 '12 at 1:56
Well. But I think I can't still clearly understand this. Although I have finished the related exercises in SICP second version, I think I cannot design an implicit definition for a bit more difficult one. For example, randomly writing this stream: a_0 = 1, a_n = a_0 + a_1 + ... + a_(n div 2), I cannot discover an implicit definition. –  Frank Science Apr 3 '12 at 7:02
Still thanks to you. –  Frank Science Apr 3 '12 at 7:03
I still take yours as answer. –  Frank Science Apr 7 '12 at 4:01
add comment

To answer your question in the comments,

Prelude> let bs = 1:map (\n-> sum $ take (n+1) bs) ( map (`div`2) [1..])
Prelude> take 20 bs

Prelude> let as = 1:1:g 2 (drop 2 as) where g x ~(a:b) = x:x:g(x+a)b
Prelude> take 20 as

Prelude> take 20 $ map (\n-> sum $ take (n+1) as) $ map (`div`2) [0..]
share|improve this answer
add comment

Your Answer


