News for hackers. Stuff that matters.
Re:Basic Patterns for Everyday Programming by evmar on Wednesday November 23, 2011 @01:36AM (#3269064)
The last example also doesn't actually memoize if the result of the computation is false -- it will recompute on each call.
Re:Basic Patterns for Everyday Programming by adammacleod on Wednesday November 23, 2011 @01:38AM (#3269069)
It will store a false in the JavaScript version, I'm not familiar with Ruby but I believe you are correct in that case.