Hacker News new | past | comments | ask | show | jobs | submit login

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?!




> 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

And this explains where the monad laws come from:

https://www.haskellforall.com/2012/08/the-category-design-pa...


I think "functorial" may be the right word - try https://en.m.wikipedia.org/wiki/Functoriality


Would that make "monadial" the right word for monadic values?!


I 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.


Monadic/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.


Does it feel weird to call spaghetti a meal?


A more accurate translation to food would be something like “does it feel weird to call a physical plate of spaghetti a recipe?”




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: