Pattern Matching

0

Scala supports a general way of taking some expression apart and checking if it matches some pattern (with its fractional constituents). Data corresponding to the whole pattern or to some of its constituents can be extracted and saved to new values for additional processing.

More...