Skip to content

Instantly share code, notes, and snippets.

@lucaspolo
Created October 3, 2021 19:30
Show Gist options
  • Save lucaspolo/adb0c68ed44663b5624eaf4005440f84 to your computer and use it in GitHub Desktop.
Save lucaspolo/adb0c68ed44663b5624eaf4005440f84 to your computer and use it in GitHub Desktop.
object CasamentoDePadroes extends App {
var x: Any = "Desconhecido porém string";
x match {
case "oi" => println("Hello")
case "Scala" => println("Hello Scala")
case value: String => println(s"This is a string: $value")
case _ => println("A strange object")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment