2 ms·
Right. Personally I'd be much happier using an STRef. The code is much more explicit.
by kccqzy 3y ago
Right. Personally I'd be much happier using an STRef. The code is much more explicit.
- throwaway81523 3y agoThe trouble then is that you have to wrap the memoized function and everything that uses it in the ST monad. Lazy evaluation is completely pure.