When an unapply method yields a pair, you can use infix notation in the case clause. In particular, you can use infix notation with a case class that has two parameters. For example:
amt match { case a Currency u => ... } // Same as case Currency(a, u)
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.