I\'ve been fiddling around recently with generic types, and while writing one function I had to determine the return type using one of the parameters from the function.