Infer function return type based on input types - Theo's Typesafe Cult