Suppose we have a function "f :: a -> b -> (a, b)" then supposing it is also invertible…
- User
Suppose we have a function "f :: a -> b -> (a, b)" then supposing it is also invertible the inverse would have type "f' :: (a, b) -> (a, b)" but there's a non-pleasing asymmetry in the type defintions here. Of source, had we used the curried form "f :: (a, b) -> (a, b)" for the function then the type definition of the inverse has a nice symmetric form also. But then we lose the nice function application properties of the uncurried form. I'm wondering if there's some theory that explored this more deeply, specifically if there's a way to talk about multiple return types of a function in a way such that the inverse of that function would naturally have an uncurried form.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.