3 ms·
> According to currying, 'a -> 'b -> 'c is interchangeable with 'a * 'b -> 'c. (The fancy math word for this interchangeability is "isomorphism.") I thought is
by leshow 7y ago
> According to currying, 'a -> 'b -> 'c is interchangeable with 'a * 'b -> 'c. (The fancy math word for this interchangeability is "isomorphism.")
I thought isomorphism was when a function was reversible. I didn't think it had anything to do with currying.
- Iceland_jack 7y agoIt means there are two functions going between them that witness the isomorphism. The witnesses in Haskell are the higher-order functions (they transform functions) `{,un}curry`: curry :: ((a, b) -> c) -> (a -> b -> c) uncurry :: (a -> b -> c) -> ((a, b) -> c)
- TheAsprngHacker 7y agoIsomorphism is not about currying. When I mentioned isomorphism, I was referring to the interchangeability in general, and the currying relationship is just an example of an isomorphism. In category theory notation: Hom(A * B, C) ~ Hom(A, C ^ B) This is one of the laws of a Cartesian closed category. The simply typed lambda calculus with products is the internal language of a Cartesian-closed category.