Two argument Memoization

后端 未结 5 2105
既然无缘
既然无缘 2021-01-06 07:48

In C# how do I memoize a function with two arguments?

Do I have to curry before memoization?

Wes Dyer wrote the Memoization code I typically use, but now I n

5条回答
  •  太阳男子
    2021-01-06 08:19

    I also did some work on memoization in C#. My results are similar but use a dictionary key derived from the concatenation of the input object hash codes. The pattern can be extended to as many intputs as Func<> will allow.

    Se more here: http://bit.ly/t6iNJP

提交回复
热议问题