I am probably not phrasing this question well, so please bear with me as I try to explain what I mean.
I am working on learning category theory, as applied to programming. So far, I understand that:
- Objects in a category are "unbroken"; you're not supposed to peer inside them to see their internal structure.
- Any Set is a category
- Programming language types can be thought of as sets. (Bool is the set True, False; Int is the set of all integers; etc.)
- Thus, all of the types in a language form a category of sets.
- Morphisms are arrows between objects.
- If those objects are themselves categories, then the morphisms get called functors.
Taken together, that would imply that a function from Int to Bool is a functor, because it's a map from the the set category Int to the set category Bool.
However, I have also read elsewhere (in particular https://www.johndcook.com/blog/2014/05/10/haskell-category-theory/), that thinking of it that way is wrong and we really shouldn't be talking about language types being a base category with "just" morphisms. But I don't see how that fits with my previous logic.
I therefore must conclude that my previous logic is faulty, but I'm unclear how or why. What is the right way to conceptualize this? Are Sets just extra special exceptions? Or is it really just an arbitrary matter of preference for how to view the problem space? Or am I just flat out wrong somewhere?