With all the hype around functional programming, which are the best resources to getting started in functional programming [for a C# programmer]? I am not looking for C# 3.0 language improvements.
I learned functional programming in college, using language Haskell.
In its homepage you most likely find what you need to get started :)
BTW, it takes a lot of practice to see the solution; algorithms, as such, are not what everybody's used to code in Object-Oriented, logic or procedural languages.
I think for a C# developer with .NET background, the best way to enter functional programming is to learn F#.
Spend some time looking at Lisp or Scheme as they're the mother and father of functional programming. PLT Scheme is a great environment to play with Scheme. Get yourself a copy of The Little Schemer as it's a good introduction to Scheme and will help you get up to speed fairly quickly.
Once you've got your head around functional try doing some of the Project Euler problems in a functional way.
Pick a functional language. Python has many functional features. Haskell is purely functional.
Go to Project Euler.
Solve some problems.
If you look at the Project Euler stats, Python and Haskell are very highly ranked.
Edit
Functional Programming in Python:
- http://www.ibm.com/developerworks/library/l-prog.html
- http://www.amk.ca/python/writing/functional
- http://linuxgazette.net/109/pramode.html
- http://www.slideshare.net/adambyrtek/functional-programming-with-python-516744
- http://scott.andstuff.org/FunctionalPython
- http://docs.python.org/tutorial/datastructures.html#functional-programming-tools
- http://www.freenetpages.co.uk/hp/alan.gauld/tutfctnl.htm
I agree with Mehrdad Afshari. If you are familiar with C# start functional programming with F#. The syntax is similar to lambda expressions in C#.
Shameless plug: I'm the co-author (well, glorified editor really :) of Real World Functional Programming. It's squarely aimed at people such as yourself. It teaches the principles of functional programming, mostly via F#, and also shows how you can apply the same principles in many cases in C#.
It assumes you know C# already, but introduces F# from scratch. It gives you enough knowledge of F# to get you started so you can experiment, but the aim is to teach a functional way of thinking rather than going into every nook and cranny of F# as a language. (In other words, if you want to start using F# as a production language, I'd get another book as well.)
It's not out yet, but you can get early access via the MEAP programme. Several chapters are available already, with more coming soon.
The free online version of Real World Haskell is a good, cheap way to get started.
Once you've done a few chapters, you'll be in a position to decide whether FP is for you, and whether you want to continue with Haskell or move on to some other language. You may even go on to buy the dead tree version (as I did).
The paradigms you learn from this book, especially the opening chapters, apply equally well to other functional languages. (I like to think my Javascript and Groovy benefited from my studying Haskell).