© 2026 Dometrain. All rights reserved.
Learn how to write F# code, from your first functions to using pipelines, pattern matching, and discriminated unions.
Functional programming in F# requires a different approach to structuring data and behavior. This course builds your F# foundation from the ground up, starting with core mechanics like function definitions, type inference, and explicit type annotations. You will learn how to safely cross between int and float types, format text with sprintf and interpolated strings, and normalize, slice, and parse string inputs. From there, we cover how F# handles decision-making, demonstrating how an if statement produces a value and how to order your tests so the first match wins. You will then move into pattern matching, learning how to match specific values, add conditions to branches, destructure the shape of a list, and use the function shorthand.
Once you understand the basics, the course moves into collections and functional data transformations. You will manipulate lists using ranges, filtering, and folding, and chain these operations together using pipelines to read your code from left to right. We explore how to pass functions as values, supply arguments one at a time, and build recursive functions with accumulators while managing stack depth. You will then master F#'s core type system, grouping data with tuples, defining immutable records, and modeling closed sets of data using discriminated unions. We dedicate specific modules to handling missing data with the option type, managing failures by choosing between Result and exceptions, and working with maps, sets, and lazy sequences. Finally, you will see how to handle state with mutable locals and arrays, organize your code with functions that work for any element type, and put everything together by parsing delimited text into records, running batch validations, and generating grouped summary reports.