From 8df55dc9f9b0f6161e0c6630a620a35ac0170a13 Mon Sep 17 00:00:00 2001 From: qilab gamma Date: Sun, 2 Aug 2015 14:49:02 +0900 Subject: rename argument f of LinearSeqOptimized.foldLeft/foldRight to op in accordance with scaladoc --- src/library/scala/collection/LinearSeqOptimized.scala | 8 ++++---- 1 file 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 = -- cgit v1.2.3