One of the requirements is that you have to pass a generic getWeight to SumWeights somehow. Imagine that there are multiple different implementations of getWeight that all have the same type signature. How do you tell SumWeights which version to use?
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.