The reason this all works is that generators plus memoization is "just" an implementation of the lazy sequences that Haskell has built in.
The reason this all works is that generators plus memoization is "just" an implementation of the lazy sequences that Haskell has built in.