diff options
author | qilab gamma <qilab@gmx.com> | 2015-08-02 14:49:02 +0900 |
---|---|---|
committer | qilab gamma <qilab@gmx.com> | 2015-08-02 14:49:02 +0900 |
commit | 8df55dc9f9b0f6161e0c6630a620a35ac0170a13 (patch) | |
tree | 2a295b454c079918fd2bde39f6103b4e54f362a7 | |
parent | d7cf43f6933f6cdcca253ae5792ad9325da35ecf (diff) | |
download | scala-8df55dc9f9b0f6161e0c6630a620a35ac0170a13.tar.gz scala-8df55dc9f9b0f6161e0c6630a620a35ac0170a13.tar.bz2 scala-8df55dc9f9b0f6161e0c6630a620a35ac0170a13.zip |
rename argument f of LinearSeqOptimized.foldLeft/foldRight to op in accordance with scaladoc
-rwxr-xr-x | src/library/scala/collection/LinearSeqOptimized.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/scala/collection/LinearSeqOptimized.scala b/src/library/scala/collection/LinearSeqOptimized.scala index 9c336e8e31..4f73fcc987 100755 --- a/src/library/scala/collection/LinearSeqOptimized.scala +++ b/src/library/scala/collection/LinearSeqOptimized.scala @@ -117,20 +117,20 @@ trait LinearSeqOptimized[+A, +Repr <: LinearSeqOptimized[A, Repr]] extends Linea } override /*TraversableLike*/ - def foldLeft[B](z: B)(f: (B, A) => B): B = { + def foldLeft[B](z: B)(op: (B, A) => B): B = { var acc = z var these = this while (!these.isEmpty) { - acc = f(acc, these.head) + acc = op(acc, these.head) these = these.tail } acc } override /*IterableLike*/ - def foldRight[B](z: B)(f: (A, B) => B): B = + def foldRight[B](z: B)(op: (A, B) => B): B = if (this.isEmpty) z - else f(head, tail.foldRight(z)(f)) + else op(head, tail.foldRight(z)(op)) override /*TraversableLike*/ def reduceLeft[B >: A](f: (B, A) => B): B = |