On Thu, Jul 17, 2008 at 11:36 AM, Paul Chiusano <
paul.chiusano@...> wrote:
Take the following function:
def integerDivide[K](denominator: Int, vs: Map[K,Int]): Map[K,Int] =
vs.transform((k,v) => v/denominator)
It seems silly to have K appear as a type parameter to this function since it is not "touched" by the body of the function.
I don't think it's silly because it specifies that the return type is the same as the type passed in. Otherwise, you're looking at an undefined return type....
alex