An implicit equality typeclass instance, 2015: implicit val intEqual: Eq[Int] = new Eq[Int] { def equal(x: Int, y: Int): Boolean = x == y } (1/8)
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Lovely to see the noise of the unneeded `intEq` name going away there

-
You're still gonna need it in situations like //dumb examples but you get the idea given [A: Eq]: Monoid[List[A]] given [A: Semigroup]: Monoid[List[A]] because the generated name is going to be the same (Monoid_List_A or something like that) but in 90%+ cases it'll be

- Show replies
New conversation -
-
-
I'm still kinda pissed that we can't do this if the method is declared as an extension method :( Actually, scratch that, I'm kinda angry that extension methods can be abstract and non-final.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.