Name: Anonymous 2009-05-25 16:52
Streams are a higher-level, more straightforward way to think about programs. Haskell is a decent high-level language (which /prog/ seems to have a fetish for), so here's an implementation of streams in Haskell.
Have fun!
delay e = (\ () -> e)
force e = e
streamHead e = head $ force e
streamTail e = tail $ force e
streamNull = delay []
makeStream f l = (f $ head l):(delay $ makeStream f (tail l))Have fun!