Skip to content

Comment on Functors, Applicatives, and Monadsparent

Comments

Yes, I really need a real word Haskell project simple enough to understand all the math concept

There actually is a book with precisely that title, which provides what you're asking for: https://book.realworldhaskell.org/

Like, I don't know when to implement the Monad type-class to my domain data types

A concrete type (such as your Tweet type) can't be a Monad. Monad is implemented on generic types (think: `MyType a`, where `a` can be filled in with a concrete type to produce e.g. `MyType Int` or `MyType String`).

Most monads are data structures like list `[a]` or structures which provide context to computations like `State s a` or `Reader r a`

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.