1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-11 17:24:29 +02:00

Merge pull request #943 from ikr0m/patch-1

Update scala.html.markdown
This commit is contained in:
Geoff Liu
2015-01-28 21:08:18 -07:00

View File

@@ -453,7 +453,7 @@ def matchEverything(obj: Any): String = obj match {
// feature is so powerful that Scala lets you define whole functions as
// patterns:
val patternFunc: Person => String = {
case Person("George", number") => s"George's number: $number"
case Person("George", number) => s"George's number: $number"
case Person(name, number) => s"Random person's number: $number"
}