We want to maintain the sequence of iterations of some function f,
f: I × S → S
I: “input” from external world - list of edges, for example S: “state” of iteration, needs an initial value - a frontier, for example
iterate : I × S → Stream S iterate (input, state) = state :: iterate (input, f (input, state))