I would like to be able to use a case class something like:
case class A[T](item: T)(implicit refine: T => T = (t: T) => t)
A("Hello")
A("World")(_.toLowerCase)
Such that I only have to define the refine function when needed.
But my case class also needs a ClassTag and I don't know any way I can also include it. For example the folllowing won't compile:
case class A[T](item: T)(implicit refine: T => T = (t: T) => t)(implicit ct: ClassTag[T])
Is there a way I can implicitly pass the ClassTag to A as well as the refine function?