Go ProSign in
Get Started with Reason

Get Started with Reason


    Pattern Matching using switch in Reason

    Nik GrafNik Graf

    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.

    You must be a Member to view code