Skip to content

Commit 8df55dc

Browse files
author
qilab gamma
committed
rename argument f of LinearSeqOptimized.foldLeft/foldRight to op in accordance with scaladoc
1 parent d7cf43f commit 8df55dc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/library/scala/collection/LinearSeqOptimized.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,20 +117,20 @@ trait LinearSeqOptimized[+A, +Repr <: LinearSeqOptimized[A, Repr]] extends Linea
117117
}
118118

119119
override /*TraversableLike*/
120-
def foldLeft[B](z: B)(f: (B, A) => B): B = {
120+
def foldLeft[B](z: B)(op: (B, A) => B): B = {
121121
var acc = z
122122
var these = this
123123
while (!these.isEmpty) {
124-
acc = f(acc, these.head)
124+
acc = op(acc, these.head)
125125
these = these.tail
126126
}
127127
acc
128128
}
129129

130130
override /*IterableLike*/
131-
def foldRight[B](z: B)(f: (A, B) => B): B =
131+
def foldRight[B](z: B)(op: (A, B) => B): B =
132132
if (this.isEmpty) z
133-
else f(head, tail.foldRight(z)(f))
133+
else op(head, tail.foldRight(z)(op))
134134

135135
override /*TraversableLike*/
136136
def reduceLeft[B >: A](f: (B, A) => B): B =

0 commit comments

Comments
 (0)