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 7fa8beb commit 953de75Copy full SHA for 953de75
docs/docs/reference/new-types/match-types.md
@@ -67,7 +67,7 @@ use of the match type as the return type):
67
def leafElem[X](x: X): LeafElem[X] = x match
68
case x: String => x.charAt(0)
69
case x: Array[t] => leafElem(x(9))
70
- case x: Iterable[t] => leafElem(x.next())
+ case x: Iterable[t] => leafElem(x.head)
71
case x: AnyVal => x
72
```
73
0 commit comments