4 ms·
Someone may correct me but - in three levels of conciseness... A monad is a function that can be combined with other functions. It's a closure (or functor to
by munk-a 1y ago
Someone may correct me but - in three levels of conciseness...
A monad is a function that can be combined with other functions.
It's a closure (or functor to the cool kids) that can be bound and arranged into a more complex composite closure without a specification of any actual value to operate on.
It's a lazy operation declaration that can operate over a class of types rather than a specific type (though a type is a class of types with just a single type so this is more a note on potential rather than necessary utility) that can be composed and manipulated in languages like Haskell to easily create large declarative blocks of code that are very easy to understand and lend themselves easily to abstract proofs about execution.
You've probably used them or a pattern like them in your code without realizing it.
- 1718627440 1y agoSo it's a function pointer, right? /s