|
|
|
|
|
by tomsmeding
420 days ago
|
|
Interesting! My intuition was wrong. I neglected to fully appreciate that the list is memoised. What's happening, if I'm not mistaken, is that the unevaluated tail of the list is at all times a thunk that holds a reference to the cons cell holding the previous list item. Hence this is more like `iterate (+1) 1` than it seems at first glance. |
|