Previously, I wrote example code that used one of my library functions to construct a dictionary when given a list or pair of list. Since the place of gainful employment moved to .NET 3.5 I have been able to write some truly linq-y code, and have observed many wonderful things, in particular the extension methods of IEnumerable
. Check out
ToDictionary( keyFn, valueFn)
It's exactly what I was writing in my Functional.array.toDict function. Good work, Microsoft!
No comments:
Post a Comment