case classwith[T]()(implicit t: T) extends Product with Serializable
Wrapper for summoning an implicit and using it in a block:
Wrapper for summoning an implicit and using it in a block:
implicitdef show[T]: Show[T] = {
// expensive / non-idempotent derivation
}
wth[Show[T]] {
implicit showT ⇒
// do things that would otherwise re-derive a Show[T] instance multiple times
}
Wrapper for summoning an implicit and using it in a block: