if the declaration is
func Keys(type K, V)(m map[K]V) []K
why do we need to call it like
keys := Keys(int, string)(map[int]string{1:"one", 2: "two"})
can't the types int and string be inferred from
Keys(map[int]string{1:"one", 2:"two"})
var x []int total := Sum(x) // shorthand for Sum(int)(x)
if the declaration is
func Keys(type K, V)(m map[K]V) []K
why do we need to call it like
keys := Keys(int, string)(map[int]string{1:"one", 2: "two"})
can't the types int and string be inferred from
Keys(map[int]string{1:"one", 2:"two"})