This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/examplefiles/scala/pattern-matching.scala
2021-03-01 11:39:20 +01:00

11 lines
No EOL
275 B
Scala

def f(x: Int, y: Int) = x match {
case `y` =>
case s @ Seq(_, _, _) =>
case Seq(first, tail @ _*) =>
case first +: tail =>
case 3 | 5 | 6 =>
case y: Number => y.n
case Lit(n) => n
case IsZero(u) => eval(u) == 0
case _ => 15
}