File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
library/src/scala/collection Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -848,7 +848,7 @@ final class ArrayOps[A](val xs: Array[A]) extends AnyVal {
848
848
* `pf` to each element on which it is defined and collecting the results.
849
849
* The order of the elements is preserved.
850
850
*/
851
- def collect [B : ClassTag ](f : PartialFunction [A , B ]): Array [B ] = {
851
+ def collect [B : ClassTag ](pf : PartialFunction [A , B ]): Array [B ] = {
852
852
var i = 0
853
853
var matched = true
854
854
def d (x : A ): B = {
@@ -858,7 +858,7 @@ final class ArrayOps[A](val xs: Array[A]) extends AnyVal {
858
858
val b = ArrayBuilder .make[B ]
859
859
while (i < xs.length) {
860
860
matched = true
861
- val v = f .applyOrElse(xs(i), d)
861
+ val v = pf .applyOrElse(xs(i), d)
862
862
if (matched) b += v
863
863
i += 1
864
864
}
You can’t perform that action at this time.
0 commit comments