Scala implicit class based on type class

implicit class IntIncrement(val underlying: Int) extends AnyVal { def increment(): Int = underlying + 1 } This is valid and allows me to do something like 1.increment() I want to be able to constrain a type parameter to have this .increment() method on it, so I started doing this: trait Increment[T] { def increment(value: T):… Read More Scala implicit class based on type class