From edffb0a2ba3bc4ce0a4e28727ae5fb4e6abd0521 Mon Sep 17 00:00:00 2001 From: Alin Gabriel Arhip Date: Thu, 25 Aug 2022 21:21:03 +0300 Subject: [PATCH] Change parameter name Changed name of the collection to match the collection name `coll` given in the paragraph next to it. --- _overviews/collections-2.13/views.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_overviews/collections-2.13/views.md b/_overviews/collections-2.13/views.md index dbaad18128..edf0dde6b1 100644 --- a/_overviews/collections-2.13/views.md +++ b/_overviews/collections-2.13/views.md @@ -18,8 +18,8 @@ There are two principal ways to implement transformers. One is _strict_, that is As an example of a non-strict transformer consider the following implementation of a lazy map operation: - 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 } 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.