Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Streams in Scheme

Name: Anonymous 2011-06-04 10:12

What do you think about this stream library: http://srfi.schemers.org/srfi-41/srfi-41.html

Name: Anonymous 2011-06-04 10:22

It's a stream library.

Name: Anonymous 2011-06-04 10:54

>>2
Asexuality.

Name: Anonymous 2011-06-04 11:58

>>1
It's ok, but not perfect. The car should not be automatically delayed and it should use SRFI 45. Also it's kind of bloated.

You can use http://mumble.net/~campbell/scheme/stream.scm instead.

Name: Anonymous 2011-06-04 12:23

>>4
Yes it feels too sophisticated. They explain the delayed car in the rationale though.

Even streams are more complex than odd streams in both definition and usage, but they offer a strong benefit: they fix the off-by-one error of odd streams. Wadler, Taha and MacQueen show, for instance, that an expression like (stream->list 4 (stream-map / (stream-from 4 -1))) evaluates to (1/4 1/3 1/2 1) using even streams but fails with a divide-by-zero error using odd streams, because the next element in the stream, which will be 1/0, is evaluated before it is accessed. This extra bit of laziness is not just an interesting oddity; it is vitally critical in many circumstances, as will become apparent below.

Name: Anonymous 2011-06-04 13:15

MORE LIKE
IT'S TIME TO PARALELLIZE THIS SHIT, STREAMS ARE SO 1970
AMIRITE LOLLLLLLLLLLLLLLLLLLLLLLLZzz!!11oNE!!1ONE1!

Name: Anonymous 2011-06-05 7:46

>>6
Streams and parallel computing are orthogonal.

Name: Anonymous 2011-06-06 11:31

Name: Anonymous 2011-06-06 17:44


Don't change these.
Name: Email:
Entire Thread Thread List