Last active
January 17, 2017 08:26
-
-
Save rohinp/663bb8c005daf8a9b45d3499fbe5a10a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//We will take a really simple example of summing a list of ints | |
def summ(xs:List[Int]):Int = xs.foldLeft(0)(_ + _) | |
//there is a reason why we have selected foldLeft operation | |
//May be later in the blog it will be clear. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment