Skip to content

Instantly share code, notes, and snippets.

@rohinp
Created January 17, 2017 08:43
Show Gist options
  • Save rohinp/4a760ef80429e74b506cff9d18d1a96e to your computer and use it in GitHub Desktop.
Save rohinp/4a760ef80429e74b506cff9d18d1a96e to your computer and use it in GitHub Desktop.
// one more implementation
implicit val StringConcateMonoid = new Monoid[String] {
def associative(t1:String,t2:String): t1 + t2
def zero:Int = ""
}
//Lets pass some strings
summ(List("1.","2.","3..."))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment