I am playing with Wes Dyers' excellent Memoization Function applied on Fibonacci function and I think the Memoize extension function is not correctly executed on a method argument. More precisely the following code: using System; using System.Collections.Generic; using System.Linq; namespace Fibonacci { static class Program { public static Func <A, R> Memoize<A, R>( this Func <A, R> f) { var map = new Dictionary <A, R>(); return a => { R value; if (map.TryGetValue(a, out
Read More...