LINQ in Action roller

Function Memoization

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...
Published Friday, January 26, 2007 10:57 PM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication