3 ms·
The last example also doesn't actually memoize if the result of the computation is false -- it will recompute on each call.
by evmar 15y ago
The last example also doesn't actually memoize if the result of the computation is false -- it will recompute on each call.
- adammacleod 15y agoIt will store a false in the JavaScript version, I'm not familiar with Ruby but I believe you are correct in that case.