Last active
December 27, 2020 15:28
-
-
Save deanwampler/3060fb7cabb9f183795a2ce919f572cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
given StringMonoid: Monoid[String] with | |
def unit: String = "" | |
extension (s: String) def combine(other: String): String = s + other | |
given IntMonoid: Monoid[Int] with | |
def unit: Int = 0 | |
extension (i: Int) def combine(other: Int): Int = i + other |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment