On Wed, Oct 8, 2008 at 1:11 PM, michael rice
<xxxxxx@yahoo.com> wrote:
There's a stream-member function given in SRFI 41 that doesn't seem to work as expected.
=================
(require srfi/41)
(define s1 (stream-cons 'a (stream-cons 'b stream-null)))
(define-stream (stream-member eql? obj strm) (stream-let loop ((strm strm)) (cond ((stream-null? strm) #f) ((eql? obj (stream-car strm)) strm) (else (loop (stream-cdr strm))))))
===================
Welcome to DrScheme, version 4.1 [3m]. Language: Swindle; memory limit: 128 megabytes. > (stream-member equal? 'c s1) #<stream> >
===================
Shouldn't the answer be #f?
Michael
|
_________________________________________________
For list-related administrative tasks:
http://list.cs.brown.edu/mailman/listinfo/plt-scheme