Implementing class for pattern matching
- by Jeriho
For example,
val list = List(1,2,3)
list match{
case a:::b =>
case _ =>
}
you can match head and tail of a List using :::' or tokens of ParseResult using~'. What should I do to create class that can be matched like preceding classes?