Stats

1247 Contributors: 30
2017-07-13
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook

Pattern Matching

Download scala eBook

Syntax

  • selector match partialFunction
  • selector match {list of case alternatives) // This is most common form of the above

Parameters

ParameterDetails
selectorThe expression whose value is being pattern-matched.
alternativesa list of case-delimited alternatives.

Related Examples