diff --git a/_tour/extractor-objects.md b/_tour/extractor-objects.md index a859d6cdd..ecd1f4f91 100644 --- a/_tour/extractor-objects.md +++ b/_tour/extractor-objects.md @@ -49,9 +49,10 @@ object CustomerID: if stringArray.tail.nonEmpty then Some(stringArray.head) else None val customer1ID = CustomerID("Sukyoung") // Sukyoung--23098234908 -customer1ID match +customer1ID match { case CustomerID(name) => println(name) // prints Sukyoung case _ => println("Could not extract a CustomerID") +} ``` {% endtab %}