Skip to content

Instantly share code, notes, and snippets.

@hugoferreira
Created September 26, 2012 00:58
Show Gist options
  • Save hugoferreira/3785369 to your computer and use it in GitHub Desktop.
Save hugoferreira/3785369 to your computer and use it in GitHub Desktop.
Zeros in Scalaz
scala> mzero[Int]
res4: Int = 0
scala> mzero[List[Int]]
res5: List[Int] = List()
scala> mzero[Map[Int, Double]]
res6: Map[Int,Double] = Map()
scala> mzero[Map[Int, Boolean]]
<console>:24: error: could not find implicit value for parameter F: scalaz.Monoid[Map[Int,Boolean]]
mzero[Map[Int, Boolean]]
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment