mostly-adequate-guide icon indicating copy to clipboard operation
mostly-adequate-guide copied to clipboard

question about chapter 5 category theory's image

Open godhand4826 opened this issue 5 years ago • 0 comments

Hi, I'm recently learning category-theory and functional programming. The image in the chapter 5 category-theory is different as I imagined.

Base on my understanding...

  • In category theory, there are only object(dot) and morphism(arrow) with some rules( identity, composition associative).
  • In the category of set, dot represent set and arrow represent mathematical function(mapping between sets).
  • In the programmers point of view, the dot represent type(String, Boolean ...) and the arrow represent pure function.

My imagination is like the image showing below. The group of black arrows are a functions mapping values between types. But In the category point of view, we can't open the dot to see what elements inside because it's a dot. I know it's more intuitive to show the elements inside to make it easy to understand. And i agree with that. But I think the types in the each of the circles should be the same. If I'm wrong, please just let me know. Have a good day.

godhand4826 avatar Jun 03 '19 09:06 godhand4826