Skip to content

Instantly share code, notes, and snippets.

@mgryszko
Created February 12, 2021 05:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgryszko/7213e62d039123a6c122305e177b82cc to your computer and use it in GitHub Desktop.
Save mgryszko/7213e62d039123a6c122305e177b82cc to your computer and use it in GitHub Desktop.
implicit def monoidInstanceForFastMoney: Monoid[FastMoney] = new Monoid[FastMoney] {
override def empty: FastMoney = FastMoney.of(0, "EUR")
override def combine(x: FastMoney, y: FastMoney): FastMoney = x add y
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment