-->

What is the analog of Category in programming

2020-03-31 02:24发布

问题:

I found that there is an isomorphism between logic and programming, called Curry-Howard correspondence, so is there any such equivalence for Category theory, which helps to understand things like Functors or Monads?

回答1:

Yes! It's called Curry–Howard–Lambek - it maps Category objects to types and morphisms to terms. So, typed lambda (function without name) or even function may be represented as cartesian-closed category, where Unite-type becomes a terminal object, set of types (or more complex structure) is product, and apply+currying is exponential.