Skip to content

Commit 5464865

Browse files
authored
Merge pull request #2504 from AlinGabriel/patch-1
Change parameter name
2 parents e244cdd + edffb0a commit 5464865

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_overviews/collections-2.13/views.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ There are two principal ways to implement transformers. One is _strict_, that is
1818

1919
As an example of a non-strict transformer consider the following implementation of a lazy map operation:
2020

21-
def lazyMap[T, U](iter: Iterable[T], f: T => U) = new Iterable[U] {
22-
def iterator = iter.iterator map f
21+
def lazyMap[T, U](coll: Iterable[T], f: T => U) = new Iterable[U] {
22+
def iterator = coll.iterator map f
2323
}
2424

2525
Note that `lazyMap` constructs a new `Iterable` without stepping through all elements of the given collection `coll`. The given function `f` is instead applied to the elements of the new collection's `iterator` as they are demanded.

0 commit comments

Comments
 (0)