This is concerning chapter 3.5 from SICP, in which streams are being discussed. The idea is that:
(cons-stream 1 (display 'hey))
Should not evaluate the second part of the cons-stream, so it should not print “hey”. This does happen, I get the following output:
hey(1 . #< promise >)
So my conclusion is that delay is not implemented as a special form? Or am I doing something wrong? I use the following implementation:
(define (cons-stream a b)
(cons a (delay b)))
With delay being the default R5RS implementation. Is this a fault in the implementation, or am I not doing or understanding it right?