scalaz/scalaz — pull request #362 by oxbowlakes (2013-05-08 16:11:08+00:00)
Title: Added fold(Right/Left)1Opt and fold(r/l)1Opt

In scalaz v6, the `Foldable[A].foldl` and `Foldable[A].foldr` returned `Option[A]` (i.e. `None` if the foldable was empty, `Some` otherwise). In scalaz v7 this had been removed.

I am re-adding the functionality under the names `foldl1Opt`, `foldr1Opt`, `foldLeft1Opt` and `foldRight1Opt` but am not attached to the names if a better name is forthcoming.

I have added tests for all methods