I've been playing with Racket streams and I am confused about what exactly counts as a stream? For example, are lists streams? I think the answer is yes but then are the stream- functions supposed to work on regular lists? Some do but some don't.
Welcome to DrRacket, version 5.3.0.16 [3m]. Language: racket [custom]. > (stream-map (λ (x) x) null) . . plt/collects/racket/stream.rkt:113:0: stream-accessor: contract violation expected: stream? given: '() > (stream? null) #t > (stream-map (λ (x) x) (list 1 2)) . . plt/collects/racket/stream.rkt:113:0: stream-accessor: contract violation expected: stream? given: '(1 2) > (stream? (list 1 2)) #t > (stream-first (list 1 2)) 1 _________________________ Racket Developers list: http://lists.racket-lang.org/dev