In the last couple of months, our Nashville .NET user group (@nashdotnet) has been working hard on learning F#. By the way, if you live in Nashville and are interested in Functional Programming, you can also join Nashville Functional Programmers or NashFP (@nashfp).
In the first week, we have walked through tutorials in try F# while the second week, we have played with F# Koans. The try F# tutorials have detailed explanation and code, and it will take you some time to finish it. F# Koans, by the way, is letting you learn F# by making the unit test (e.g., koan) pass. You can go through it pretty quickly, but you might not understand what’s going on much.
For the F# Koans, the last koan that I have done is AboutTheStockExample which is pretty challenging for F# newbie like me. Coming from C#, I have to resist thinking about applying loops or mutable variables. Anyway, after 15~ minutes of trial-and-error using F# interactive tool that comes with Visual Studio, I came up with the solution:
However, the solution looks just like someone is converting C# LINQ to F#
So far Learning F# is pretty fun and addicted journey although I haven’t spent time with it much yet (haven’t finished either try F# or Koans). Hopefully, I will get better with F# and start “Thinking functionally” soon.