Hyukjin Kwon created SPARK-11687:
------------------------------------

             Summary: Mixed usage of fold and foldLeft, reduce and reduceLeft 
and reduceOption and reduceLeftOption
                 Key: SPARK-11687
                 URL: https://issues.apache.org/jira/browse/SPARK-11687
             Project: Spark
          Issue Type: Improvement
            Reporter: Hyukjin Kwon
            Priority: Trivial


As can be seen here 
https://github.com/scala/scala/blob/2.12.x/src/library/scala/collection/TraversableOnce.scala,
 fold, reduce and reduceOption came out from scala 2.9.x. In addition, all the 
implementations of fold, reduce and reduceOption call actually foldLeft, 
reduceLeft and reduceLeftOption directly without any additional codes.

For developers who is not really used to scala, the mixed usage of them might 
leave a question. Even some usages can be found where they work identically the 
same things.

This is just a little nit but I think it would be better to use only xxxLeft 
for readability.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to