© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
K. EasonStylish F# 6https://doi.org/10.1007/978-1-4842-7205-3_6

6. Pattern Matching

Kit Eason1  
(1)
Farnham, Surrey, UK
 

We may say most aptly, that the Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves.

—Ada Lovelace, Computer Pioneer

Weaving Software with Patterns

I have many “favorite” F# features, but my favorite favorite is pattern matching! Perhaps this is because it’s the feature that takes us furthest away from Object-Oriented coding, letting us truly differentiate from legacy coding patterns. Another nice aspect is how unexpectedly pervasive it can be in well-factored code bases. Prepare to be surprised ...

Get Stylish F# 6: Crafting Elegant Functional Code for .NET 6 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.