mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-10 00:36:48 +02:00
Update scala.html.markdown
Removed typo (unnecessary double quote in patternFunc)
This commit is contained in:
@@ -453,7 +453,7 @@ def matchEverything(obj: Any): String = obj match {
|
|||||||
// feature is so powerful that Scala lets you define whole functions as
|
// feature is so powerful that Scala lets you define whole functions as
|
||||||
// patterns:
|
// patterns:
|
||||||
val patternFunc: Person => String = {
|
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"
|
case Person(name, number) => s"Random person's number: $number"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user