Memoization

Don Syme blogged this quite some years ago but it just came up in a design review on my team this afternoon and it bears repeating. let memoize f =     let cache = new Dictionary<_,_>()     (fun x ->         match cache.TryGetValue x with         | true, res -> res        |…

8