[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: streams





Shriram Krishnamurthi wrote:
> 
> You can easily add streams with a few instructions.  Maybe your
> instuctor already has these handy?  (Are you taking a course at BU?
> If so, can you send me your course home page URL?  Thanks!)


Thank you both for you quick reply. I was afraid that the list was dead
or something and I would get no support.

	My course's home page is at
http://www.cs.bu.edu/faculty/kfoury/CS320-Fall00/home.html
My teacher has not provided any implementation for Dr. Scheme and
probably does not intend to. He uses MIT scheme, whose win32 package is
pretty ugly.

	To implement streams I would need an implementation of head and tail. I
understand that a thunk would be used in the implementation of tail. I
would have to use "promise" in tail to allow for lazy evaluation. I am
sure the implementation isn't has simple as 

[rough pseudo]
	(cond ((stream-car) (car lst))
	     ((stream-cdr) (display cadr lst "promise"))
	     (else display "error"))

	And i suspect it goes a little more low level than i have time for to
do this assignment involving streams. Since this is not a homework
problem in itself, this request for an implementation is not cheating
(at least in my view). (Alternatively, I could just use the MIT win32
version of Scheme.) So here it is: Could someone be so kind as to
provide me with a stream implementation or direct me to a library that
already has one. 

	In any case, any help would be appreciated.

thank you for your time,
ktpr