Skip to content

Instantly share code, notes, and snippets.

@ryandavidhartman
Last active August 29, 2015 14:22
Show Gist options
  • Save ryandavidhartman/a1c0564c4c83c65854a0 to your computer and use it in GitHub Desktop.
Save ryandavidhartman/a1c0564c4c83c65854a0 to your computer and use it in GitHub Desktop.
try_example5
def processData(data: Try[List[Data]]): Try[Int] = data match {
case Success(x) => x.sumBy(i => i.value)
case Failure(e) => Failure(e)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment