K <: AnyRef would be more in keeping with Scala