Skip to content

Instantly share code, notes, and snippets.

@manjuraj
Created August 21, 2014 00:52
Show Gist options
  • Save manjuraj/cd043b80d07eab089dda to your computer and use it in GitHub Desktop.
Save manjuraj/cd043b80d07eab089dda to your computer and use it in GitHub Desktop.
Scala Option fold
// http://stackoverflow.com/questions/5328007/why-doesnt-option-have-a-fold-method
// See scalaz option cata()
//
// fold[B](ifEmpty: => B)(f: A => B): B
http://www.blumenfeld-maso.com/2010/01/scala-word-of-the-day-catamorphism/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment