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.

📉 Falling 0.4x Programming Languages
4,275
Comments
20
Years Active
5
Top Authors
#8254
Topic ID

Activity Over Time

2007
1
2008
14
2009
61
2010
106
2011
95
2012
160
2013
345
2014
312
2015
412
2016
241
2017
305
2018
380
2019
285
2020
285
2021
313
2022
280
2023
236
2024
229
2025
199
2026
16

Keywords

e.g NET STM LISP NULL FP github.com ZIO CPP E.g monad monads haskell notation io bind language mutability syntax functional

Sample Comments

tedreed May 22, 2020 View on HN

What's monadic about this?

duaneb Jan 17, 2014 View on HN

Monads are easy to implement in pretty much any language—are you referring to the `do` syntax?

yyhhsj0521 Mar 24, 2016 View on HN

Sounds like Haskell's list monads to me.

panopticon May 28, 2020 View on HN

That depends on the language. Haskell provides some nice syntax here with monads.

AzzieElbab Aug 15, 2021 View on HN

Monad is a thingie that lets you sequence computations in the same context. Context being something like Future or Stream or List

bvrmn Aug 12, 2018 View on HN

Monad abstraction is a mere crutch to fulfill compiler greed. It is not needed in dynamically typed langs.

sirseal May 29, 2015 View on HN

You realize a Monad is a concept, not a language feature. One can implement a Monad in any language.

_answ Sep 30, 2024 View on HN

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

abecedarius Jun 14, 2021 View on HN

Isn’t this like saying Haskell’s monads are awkward and should be implicit?

tempodox Oct 25, 2019 View on HN

A nice, unobtrusive way of showing monads at work.