The Hazy Haskell Compiler

I already answer this a while ago:

Basically, you remove the sharing for local recursive bindings. It’s the same as if you rewrote all your (local) recursive code with the non sharing fix.

fix f = f (fix f)

For the repeat example, evaluting n cells will be O(n) memory.

3 Likes