spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-3285) Using values.sum is easier to understand than using values.foldLeft(0)(_ + _)
Date Thu, 28 Aug 2014 12:38:08 GMT

    [ https://issues.apache.org/jira/browse/SPARK-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14113713#comment-14113713
] 

Apache Spark commented on SPARK-3285:
-------------------------------------

User 'watermen' has created a pull request for this issue:
https://github.com/apache/spark/pull/2182

> Using values.sum is easier to understand than using values.foldLeft(0)(_ + _)
> -----------------------------------------------------------------------------
>
>                 Key: SPARK-3285
>                 URL: https://issues.apache.org/jira/browse/SPARK-3285
>             Project: Spark
>          Issue Type: Test
>          Components: Examples
>    Affects Versions: 1.0.2
>            Reporter: Yadong Qi
>
> def sumB >: A: B = foldLeft(num.zero)(num.plus)
> Using values.sum is easier to understand than using values.foldLeft(0)(_ + ), so we'd
better use values.sum instead of values.foldLeft(0)( + _)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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


Mime
View raw message