In APL and Haskell, does the term monad mean two totally different things, or the same thing viewed from two different perspectives.
I'm rather new to both languages and trying to make sense of the higher-level concepts.
Totally different, in Haskell a monad is anything equipped with two functions
bind :: m a -> (a -> m b) -> m b
return :: a -> m a
And a few rules about how they play together. It's actually a construction from category theory.
In APL a monad is just a term for describing how many arguments a function (verb) takes. It appears that in "monad" may be used as a synonym for "unary function" and is a term commonly found in logic and linguistics.
Two completely different things! Monad often goes in series with "Dyad" and "Triad" simply meaning "of one", "of two", "of three". In the case of APL it indicates "of one argument".
Monads in Haskell are completely different. They probably take their etymology from "monoid" and "operad" both of which also being completely different.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With