Hello,the documentation for the racket/stream module states that lists can be used as streams transparently and stream? returns #t when applied to a list. However, some of the functions operating on streams fail when applied to lists. For example:
$ racket Welcome to Racket v5.3. -> (define l '(1 2 3)) -> (stream? l) #t -> (stream-map add1 l) ; stream-accessor: contract violation ; expected: stream? ; given: '(1 2 3) ; [,bt for context]Other functions that don't work with lists are stream-length, stream-ref, stream-tail, stream-append, stream-filter? and stream-add-between.
To me this looks like a bug :-( Ciao, Thomas -- When C++ is your hammer, every problem looks like your thumb.
smime.p7s
Description: S/MIME Cryptographic Signature
____________________ Racket Users list: http://lists.racket-lang.org/users