(wat-aro)

生きてます

SICP 問題 3.51

(define (show x)
  (display-line x)
  x)


(define x (stream-map show (stream-enumerate-interval 0 10)))
0x
(stream-ref x 5)
1
2
3
4
55
(stream-ref x 7)
6
77

memo-procのおかげで(stream-ref x 7)では(stream-ref x 5)の計算は行っていない. そのため6と77しか表示されない.