4 ms·
I cringed a little when, in the example of fmap (+3) (Just 2), they call (Just 2) a functor. After just having explained that a functor is a typeclass. So Maybe
by tromp 5y ago
I cringed a little when, in the example of fmap (+3) (Just 2), they call (Just 2) a functor. After just having explained that a functor is a typeclass. So Maybe is a functor, but it feels weird to call values of type (Maybe a) functors as well.
Monad tutorials often avoid this problem by talking about monadic values, so perhaps in this example it could be called a functoric value?!
- TheMatten 5y agoI think "functorial" may be the right word - try https://en.m.wikipedia.org/wiki/Functoriality https://en.m.wikipedia.org/wiki/Functoriality
- tromp 5y agoWould that make "monadial" the right word for monadic values?!
- TheMatten 5y agoI usually see "monadic" - I mean, I don't think that spelling of words in general tends to be tied to their meaning in specific contexts.
- tel 5y agoMonadic/functorial are the adjective forms of monad/functor. You might say that "List has a monadic nature". This is hinting at the idea that List by itself isn't really a Monad, but instead (List, pure, bind) is. The op is talking about something different, though. What is a term for List Int, a concrete type instead of a type constructor. We cannot call List Int a Monad, we cannot even call (List Int, pure_Int, bind_Int) a Monad. The definition really requires polymorphism. But, obviously, List Int is closely related to the List-Monad. I've also heard "monadic value" used. I tend to just use "monad" even though I know it's an even greater abuse of language.
- throwaway81523 5y ago> it feels weird to call values of type (Maybe a) functors as well. Yes, that is bogus. If you're tolerant of math jargon, I found this article demystified the topic more than anything else did: https://en.wikibooks.org/wiki/Haskell/Category_theory https://en.wikibooks.org/wiki/Haskell/Category_theory And this explains where the monad laws come from: https://www.haskellforall.com/2012/08/the-category-design-pattern.html https://www.haskellforall.com/2012/08/the-category-design-pa...
- ford_o 5y agoDoes it feel weird to call spaghetti a meal?
- matt-noonan 5y agoA more accurate translation to food would be something like “does it feel weird to call a physical plate of spaghetti a recipe?”