That is the real question. The problem with the array implementation is that it is hard to interpret in terms of imperative code. So is there a way to keep more true to the definition? The main problem seems to be situated when moving from a pure operation on a stream, to a non-pure stateful operation on the next element. Somehow, something is lost. Who owns that context, the state streams?