Skip to content

Commit 953de75

Browse files
Fix #11438: fix typo in match type docs snippet
1 parent 7fa8beb commit 953de75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docs/reference/new-types/match-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ use of the match type as the return type):
6767
def leafElem[X](x: X): LeafElem[X] = x match
6868
case x: String => x.charAt(0)
6969
case x: Array[t] => leafElem(x(9))
70-
case x: Iterable[t] => leafElem(x.next())
70+
case x: Iterable[t] => leafElem(x.head)
7171
case x: AnyVal => x
7272
```
7373

0 commit comments

Comments
 (0)