Discord is now Scala’s main chat platform. Please join us at https://discord.com/invite/scala
Left
and Right
prettyPrint
, overriding breaks everywhere
Mult
way more.
trait Add[A] {
def num(i: Int): A
def plus(l: A, r: A): A
}
def foo[A](implicit alg: Add[A]): A = alg.plus(alg.num(1), alg.num(2))