Парень, о котором она говорит
Парень, о котором она говорит не беспокоиться I've been going through the Typescriptopedia to learn the type classes. I'm stuck understanding Alternative (and MonadPlus, for that matter). The problems I'm having: • the 'pedia says that "the Alternative type class is for Applicative functors which also have a monoid structure." I don't get this -- doesn't Alternative mean something totally different from Monoid? i.e. I understood the point of the Alternative type class as picking between (two things, whereas I understood Monoid as being about combining things. • why does Alternative need an empty member/member? It may be worth it seems to not be used at all ... at least in the code I could find. And it seems not to fit with the theme of the class -- if I have two things, and need to pick one, what do I need an 'empty' for? • why does the Alternative type class need an Applicative constraint, and why does it need a kind of <*>? Why not just have <> : a -> a -> a? All of the instances could still be implemented in the same way ... I think (not sure). What value does it provide that doesn't? • what's the point of the MonadPlus type class? Can't I unlock all of its goodness by just using something as both a Monad and Alternative? Why not just ditch it? (I'm sure I'm wrong, but I don't have any counterexamples) Hopefully all those questions are coherent ...! Я How do I make sand not fall in minecraft?
На верхнем скриншоте парень задаёт длинный и запутанный вопрос о типах Alternative и MonadPlus в TypeScript/Haskell-подобном программировании. Внизу «я» задаёт предельно простой вопрос о том, как сделать так, чтобы песок не падал в Minecraft. Мем используется как реакция на несоразмерность сложности чужих разговоров или проблем и собственных простых вопросов. EN: The top screenshot shows a guy asking a long, complicated question about the Alternative and MonadPlus type classes in TypeScript/Haskell-like programming. Below, “me” asks an extremely simple question about how to stop sand from falling in Minecraft. The meme is used as a reaction to the mismatch between the complexity of someone else’s discussions or problems and one’s own very simple questions.
- @profunctor_io / 4763 2020-06-14
- Template
- The Guy She Tells You Not to Worry About
- Type
- image
- Size
- 511×800 · 83.5 KiB
- Mood
- ироничный, абсурдный
- Language
- ru
- Added