Monads in Programming
Comments discuss the concept of monads, their implementations and syntax in languages like Haskell (e.g., do-notation, list and Maybe monads), and debates on their necessity, portability to other languages, and relation to abstractions like applicatives.
Activity Over Time
Top Contributors
Keywords
Sample Comments
What's monadic about this?
Monads are easy to implement in pretty much any language—are you referring to the `do` syntax?
Sounds like Haskell's list monads to me.
That depends on the language. Haskell provides some nice syntax here with monads.
Monad is a thingie that lets you sequence computations in the same context. Context being something like Future or Stream or List
Monad abstraction is a mere crutch to fulfill compiler greed. It is not needed in dynamically typed langs.
You realize a Monad is a concept, not a language feature. One can implement a Monad in any language.
A list is a monad, but not because it wraps another type. What you're describing is higher kinded types.A monad is a specific variant of a higher kinded type whose primary property lies in the fact that its value can be "evolved" via a specific function application (usually known as the "bind" operation). This sounds confusing but it's really a simple concept: if you take a higher kinded type, you can think about the values within it as the data and the type itse
Isn’t this like saying Haskell’s monads are awkward and should be implicit?
A nice, unobtrusive way of showing monads at work.