Skip to content

Commit

Permalink
fix(docs): Rename variable iter to coll for consistency with docu…
Browse files Browse the repository at this point in the history
…mentation

Replaced variable name `iter` with `coll` in the code examples to align with the surrounding documentation and improve clarity.
  • Loading branch information
blank71 committed Jan 4, 2025
1 parent d94c195 commit 4d28131
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions _overviews/collections-2.13/views.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ As an example of a non-strict transformer consider the following implementation
{% tabs views_1 class=tabs-scala-version %}
{% tab 'Scala 2' for=views_1 %}
```scala mdoc
def lazyMap[T, U](iter: Iterable[T], f: T => U) = new Iterable[U] {
def iterator = iter.iterator.map(f)
def lazyMap[T, U](coll: Iterable[T], f: T => U) = new Iterable[U] {
def iterator = coll.iterator.map(f)
}
```
{% endtab %}
{% tab 'Scala 3' for=views_1 %}
```scala
def lazyMap[T, U](iter: Iterable[T], f: T => U) = new Iterable[U]:
def iterator = iter.iterator.map(f)
def lazyMap[T, U](coll: Iterable[T], f: T => U) = new Iterable[U]:
def iterator = coll.iterator.map(f)
```
{% endtab %}
{% endtabs %}
Expand Down

0 comments on commit 4d28131

Please sign in to comment.