fork(6) download
  1. object Main {
  2.  
  3. def f(x: Int): String = x match {
  4. case 1 => "One"
  5. case 2 => "Two"
  6. case _ => "Unknown!"
  7. }
  8.  
  9. def main(args: Array[String]): Unit = {
  10. println(f(2))
  11. println(f(3))
  12. }
  13.  
  14. }
Success #stdin #stdout 0.3s 322240KB
stdin
Standard input is empty
stdout
Two
Unknown!