I would like to learn the "functional" parts of C# (.NET 4). As a long time Haskell and Lisp programmer, I would prefer not to get distracted by explanations of basic concepts. Is there a book/tutorial that I should check out?
Check this out 101 Examples on Linq here
Just look at the docs for the methods in System.Linq.Enumerable.
These methods are standard functional programming operations with slightly different names (Select == Map, Where == Filter, Aggregate = foldl, etc)
You'll also need to understand iterators; see Jon Skeet's excellent in-depth article.
You should already understand lambda expressions and closures.
I would like to learn the "functional" parts of C# (.NET 4). As a long time Haskell and Lisp programmer, I would prefer not to get distracted by explanations of basic concepts. Is there a book/tutorial that I should check out?
Yes, there is a book made just for you! Check out Real-World Functional Programming With Examples in F# and C#. Extraordinarily good book.
I recommend reading some of Bart De Smet's blog posts for a decent view of the more theoretical side of C# lambdas and how they interact with LINQ. He doesn't blog often but he's got a good list of some of the more interesting posts here. I particularly like his post on MinLINQ.
If you wanted to jump in I'd say look at one of the many tutorials using parser combinators in C# and build your own library (with Haskell experience I'm sure you'll find it pretty easy). This is one of the more popular tutorials but a quick search reveals plenty more.
加载中,请稍侯......
精彩评论