<p>I've seen <a href="https://stackoverflow.com/questions/129877/how-do-i-write-a-generic-memoize-function">the other post about this</a>, but is there a clean way of doing this in Haskell?</p>

<p>As a 2nd part, can it also be done without making the function monadic?</p>

If your arguments are going to be natural numbers, you can do simply:
```
```
memo f = let values = map f [0..]
     in \n -> values !! n
```
```
However, that doesn't really help you with the stack overflowing, and it doesn't work with recursive calls. You can see some fancier solutions at
http://www.haskell.org/haskellwiki/Memoization
.