Skip to content

Instantly share code, notes, and snippets.

@blouerat
Created September 3, 2015 11:04
Show Gist options
  • Save blouerat/888b28ee33a3cae1b15b to your computer and use it in GitHub Desktop.
Save blouerat/888b28ee33a3cae1b15b to your computer and use it in GitHub Desktop.
OptionT.foldMapF
def foldMapF[F[_]: Monad, A, B](o: OptionT[F, A], f: A => B)(implicit M0: Monoid[B]): F[B] = o.fold(f, M0.zero)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment