Dispatch function based on value of parametric type

Nothing in particular. It is a thought / simple code experiment to understand how parameterized types work and their limitations.