Skip to content

Instantly share code, notes, and snippets.

@rohinp
Last active January 17, 2017 08:26
Show Gist options
  • Save rohinp/663bb8c005daf8a9b45d3499fbe5a10a to your computer and use it in GitHub Desktop.
Save rohinp/663bb8c005daf8a9b45d3499fbe5a10a to your computer and use it in GitHub Desktop.
//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