Getting started
- Installing and using F# will get you started.
- Why use F#? An interactive tour of F#.
- Learning F# has tips to help you learn more effectively.
- Troubleshooting F# for when you have problems getting your code to compile.
and then you can try...
- Twenty six low-risk ways to use F# at work. You can start right now -- no permission needed!
Tutorials
The following series are tutorials on the key concepts of F#.
- Thinking functionally starts from basics and explains how and why functions work the way they do.
- Expressions and syntax covers the common expressions such as pattern matching, and has a post on indentation.
- Understanding F# types explains how to define and use the various types, including tuples, records, unions, and options.
- Designing with types explains how to use types as part of the design process, making illegal states unrepresentable.
- Choosing between collection functions. If you are coming to F# from C#, the large number of list functions can be overwhelming, so I have written this post to help guide you to the one you want.
- Property-based testing: the lazy programmer's guide to writing 1000's of tests.
- Understanding computation expressions demystifies them and shows how you can create your own.
Functional patterns
These posts explain some core patterns in functional programming -- concepts such as "map", "bind", monads and more.
- Railway Oriented Programming: A functional approach to error handling
- State Monad: An introduction to handling state using the tale of Dr Frankenfunctor and the Monadster.
- Reader Monad: Reinventing the Reader monad.
- Map, bind, apply, lift, sequence and traverse: A series describing some of the core functions for dealing with generic data types.
- Monoids without tears: A mostly mathless discussion of a common functional pattern.
- Fold and recursive types: A look at recursive types, catamorphisms, tail recursion, the difference between left and right folds, and more.
- Understanding Parser Combinators: Creating a parser combinator library from scratch.
- Thirteen ways of looking at a turtle: demonstrates many different techniques for implementing a turtle graphics API, including state monads, agents, interpreters, and more!
Worked examples
These posts provide detailed worked examples with lots of code!
- Designing for correctness: How to make illegal states unrepresentable (a shopping cart example).
- Stack based calculator: Using a simple stack to demonstrate the power of combinators.
- Parsing commmand lines: Using pattern matching in conjunction with custom types.
- Roman numerals: Another pattern matching example.
- Calculator Walkthrough: The type-first approach to designing a Calculator.
- Enterprise Tic-Tac-Toe: A walkthrough of the design decisions in a purely functional implementation
- Writing a JSON Parser.
Specific topics in F#
General:
- Four key concepts that differentiate F# from a standard imperative language.
- Understanding F# indentation.
- The downsides of using methods.
Functions:
Control Flow:
- Match..with expressions and creating folds to hide the matching.
- If-then-else and loops.
- Exceptions.
Types:
- Option Types especially on why None is not the same as null.
- Record Types.
- Tuple Types.
- Discriminated Unions.
- Algebraic type sizes and domain modelling.
Controversial posts
- Is your programming language unreasonable? or, why predictability is important.
- Commentary on 'Roman Numerals Kata with Commentary'. My approach to the Roman Numerals Kata.
- Ten reasons not to use a statically typed functional programming language. A rant against something I don't get.
- We don't need no stinking UML diagrams or, why in many cases, using UML for class diagrams is not necessary.