A Scala implicit class and example

This links shows an implicit class example, combined with a string interpolation example. The final code looks like this:

// definition
implicit class HTTPInterpolation(s: StringContext) {
   object ok {
     def apply(exprs: Any*) = {
       Ok(s.s(exprs: _*))
     }
   }
}

// use
def index = Action {
  val version = 2.10
  ok"hello scala $version"
}