Type parameter bound for T in fun > foo(r: R, list: T): Unit is not satisfied: inferred type Collection is not a subtype of List