You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _overviews/collections/iterators.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -187,7 +187,7 @@ Every iterator can be converted to a buffered iterator by calling its `buffered`
187
187
res11: Int = 1
188
188
scala> bit.next()
189
189
res12: Int = 2
190
-
scala> bit.optionHead
190
+
scala> bit.headOption
191
191
res13: Option[Int] = Some(3)
192
192
193
193
Note that calling `head` on the buffered iterator `bit` does not advance it. Therefore, the subsequent call `bit.next()` returns the same value as `bit.head`.
0 commit comments