Bohtvaroh

Blogger - Scalaz Motivation - 12

Jun 1st, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.11 KB | None | 0 0
  1. def sum[M[_], T](xs: M[T])(implicit m: Monoid[T], fl: FoldLeft[M]): T =
  2.   fl.foldLeft(xs, m.mzero, m.mappend)
Advertisement
Add Comment
Please, Sign In to add comment