Beyond Conditionals: Active Patterns in F#

Pattern matching is widely used in functional languages to support ‘programming by cases.’ Common patterns such as tuples and discriminated unions are usually built into the language, but with F# active patterns you can extend pattern matching with your own classification and destructuring logic, capturing chains of if-else-else logic in a readable, reusable abstraction.

In this talk, we’ll take a tour of the various active pattern techniques available in F#, including cases, conditions and parameterised patterns. We’ll explore how to define each kind of active pattern, how to use it in a match expression and where you might apply it in your code.

 
 

Target Audience

All

schedule Submitted 3 weeks ago

Public Feedback

comment Suggest improvements to the Speaker