List is a monad
alexyorke.github.io·16w

Note July 6th 2025: this post’s original title was “A list is a monad”. It has been changed to “List is a monad”.

Note Sept 13 2025: this post has been revised based on the feedback from the Hacker News discussion.

The term “monad” is often invoked when describing patterns in functional programming. At the heart of monadic programming is sequencing computations, so each step can depend on the previous one while the monad threads context.

You may erroneously think all monads are containers, or burritos, or boxes. The simplest of monads can be idealized as a container (albeit a [flawed metaphor](https://byorgey.github.io/blog/posts/2025/06/16/monads-are…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help