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
引数を印字してから返すだけの手続き(教科書で定義)
(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