Re:Monads as a Programming Pattern
by charmonium on Monday August 12, 2019 @12:02PM
(#20676664)
Promises, as exposited in the article, are an interface for bona fide monads. I think Promises are the best example of monads because they don't just wrap a type in memory. Maybe is kind of a subset of List (as you mention), and for both the contents are available in memory. Promises are not like Lists, and their contents can't just be pulled out, so you have to use `.then` (monadic bind) to do computation on them.
[ Parent
| on HN ]
There are no comments on this comment yet.