My last series on Delphi 2009's generics was self-consciously investigating a corner case. This post, however, is going to bring us back to Earth very quickly, so prepare for a steep descent! I'm going to implement a useful, higher-order function, Memoize, using Delphi 2009's generics and anonymous methods.
Memoization is a generic solution to the problem of caching function results. The function Memoize accepts a function as an argument and returns a function which does exactly the same th...