I know what a monad is from Leibniz.<p>I know what a monad is in APL. (APL is the second computer language I learned, following Fortran IV.)<p>I know that "Monads come out of the sky and they stand there." from Yes.<p>dictionary.com tells me that monad is<p>1. Biology.<p>any simple, single-celled organism.<p>any of various small, flagellate, colorless ameboids with one to three flagella, especially of the genus Monas.<p>2. Chemistry.<p>an element, atom, or group having a valence of one.
Compare dyad (def 3), triad (def 2a).<p>3. Philosophy.<p>(in the metaphysics of Leibniz) an unextended, indivisible, and indestructible entity that is the basic or ultimate constituent of the universe and a microcosm of it.<p>(in the philosophy of Giordano Bruno) a basic and irreducible metaphysical unit that is spatially and psychically individuated.<p>any basic metaphysical entity, especially having an autonomous life.<p>4. a single unit or entity.<p>I liked this article. It was well-written and easy to understand. I thought I might have learned something about a stumbling block which I encounter every time I try to learn what FP is about.<p>coolsunglasses then says that the article is all wrong but gives very little information about what FP monads really are.<p>> It's a useful pattern that can be reified in a sufficiently expressive type system.<p>Is that not usually called a template?<p>All of my programs were functional. If they didn't function, I would not have been paid.
>small functions that lift types from simple to complex.<p>That's not what Monad is.<p>Monad isn't core to FP, but it's a convenient way to express some common things in functional programs.<p>>In the Haskell language, and many other modern languages, the definition is more complex. Here, a monad is also function, but it is a special type of function. Monads typically “lift” a primitive variable types (Integer, String, etc), to more complex types (MutableString, NullableInt).<p>This is completely wrong.<p>>we can define the Haskell monads as that which takes one singular state and outputs another.<p>This is also wrong.<p>>Thus, we can arrive at a definition of the computer science monad as a fundamental unit of computation.<p>It's not at all fundamental to computation. It's a useful pattern that can be reified in a sufficiently expressive type system.<p>There's no relationship between Leibniz monads and the Monad you see in FP. Sorry.