Pattern Matching using switch in Reason
Pattern matching is probably one of the best features of the language. It comes down to two points:
- check for a certain structure of a value
- extract parts of that value
Since it's such an integral part of the language it comes with a lot of useful tricks like piping multiple patterns into one case. In this lesson we will explore all of them.