We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ded870e commit d9a361cCopy full SHA for d9a361c
_scala3-reference/new-types/match-types.md
@@ -69,7 +69,7 @@ use of the match type as the return type):
69
```scala
70
def leafElem[X](x: X): LeafElem[X] = x match
71
case x: String => x.charAt(0)
72
- case x: Array[t] => leafElem(x(9))
+ case x: Array[t] => leafElem(x(0))
73
case x: Iterable[t] => leafElem(x.head)
74
case x: AnyVal => x
75
```
0 commit comments