Can't use type parameters from outer function

Thanks for the reply! Do not think this works, can see discussion for why here