Skip to content

Commit 4d28131

Browse files
committed
fix(docs): Rename variable iter to coll for consistency with documentation
Replaced variable name `iter` with `coll` in the code examples to align with the surrounding documentation and improve clarity.
1 parent d94c195 commit 4d28131

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

_overviews/collections-2.13/views.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ As an example of a non-strict transformer consider the following implementation
2121
{% tabs views_1 class=tabs-scala-version %}
2222
{% tab 'Scala 2' for=views_1 %}
2323
```scala mdoc
24-
def lazyMap[T, U](iter: Iterable[T], f: T => U) = new Iterable[U] {
25-
def iterator = iter.iterator.map(f)
24+
def lazyMap[T, U](coll: Iterable[T], f: T => U) = new Iterable[U] {
25+
def iterator = coll.iterator.map(f)
2626
}
2727
```
2828
{% endtab %}
2929
{% tab 'Scala 3' for=views_1 %}
3030
```scala
31-
def lazyMap[T, U](iter: Iterable[T], f: T => U) = new Iterable[U]:
32-
def iterator = iter.iterator.map(f)
31+
def lazyMap[T, U](coll: Iterable[T], f: T => U) = new Iterable[U]:
32+
def iterator = coll.iterator.map(f)
3333
```
3434
{% endtab %}
3535
{% endtabs %}

0 commit comments

Comments
 (0)