Chapter 14. Pattern Matching
Topics in This Chapter A2
Pattern matching is a powerful mechanism that has a number of applications: switch
statements, type inquiry, and “destructuring” (getting at the parts of complex expressions). This chapter covers the many forms of the match
expression, as well as the case
syntax in partial functions ...
Get Scala for the Impatient, 3rd Edition 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.