开发者

C# Lambda and LINQ tutorial for an experienced functional programmer [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments,开发者_StackOverflow社区 polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜