A few years ago when I read the presentation motivating the design behind Nessos Streams I was struck by the beauty of simplistic push streams.
type PushStream<'T> = ('T -> bool) -> bool
LINQ (in .NET) is a pull stream, ie we pull values out of the stream by calling MoveNext
+ Current
. One of the problems with pull streams is the constant checking "Are we done?" at each level in the stream.