= Solution
Apply capitalization before delegating insertion:
``
trait CapitalisePlugIn extends Doc {
abstract override def insert(x: Char, pos: Int): Unit = {
super.insert(x.toUpper, pos)
}
}
``
<Scala>'s `Char.toUpper` implements the hinted conversion and leaves ordinary nonletters unchanged. The <stackable trait modification> intercepts insertion without changing the position, result type or deletion behavior.
$$
\boxed{\text{The next trait or class receives the capitalized character}.}
$$
Back to article page