Be Lazy!
The map function takes a stream as input and returns a new stream as output.
The resultant stream forces the original stream for answers (I mean values).
Time may not exist : See how input stream is decoupled from the output stream! (forcing the input stream does not affect the output, but vice versa is not always true)
Prime Number Stays Single!
Running filter forces the input more than once, can you guess how many times it forces?
?←
stream-enumerate-interval
10000 1000000
Memory Usage: FirstStream -- 0 SecondStream -- 0
Life is not a race, be lazy (;))
Programs must be written for people to read,
and only incidentally for machines to execute. ~ SICP
?←
stream-enumerate-interval
10000 1000000
Memory Usage: FirstStream -- 0 SecondStream -- 0
Notice how the output of cdr is not really a new strem