
I think here the stream_filter will return
pair(head(stream), () => stream_filter(pred, stream_tail(stream)));
instead of
pair(head(stream), stream_filter(pred, stream_tail(stream)));
If it calls stream_filter directly in the tail, it will become an ordinary list?