3 ms·
Of course I'm not recommending learning ring theory without learning the (usual) definition of a ring. This is absolutely rigorous and useful, and immediately a
by joppy 8y ago
Of course I'm not recommending learning ring theory without learning the (usual) definition of a ring. This is absolutely rigorous and useful, and immediately after you learn it you can start playing around with rings, and start proving some interesting theorems.
The analogue of this approach in Haskell is probably something like sections 1 and 2 of "Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell" [1], which is quite an old paper (from around 2000 or something?). It does not even contain the word "monoid", but instead shows what an IO action is, and how functions like >> and >>= can be used to sequence and thread them. It also provides a lot of context as to why monadic IO exists. After reading this, a new programmer could start playing around with making new IO actions using these operators. After reading about monoid objects, a new programmer is no closer to being able to write a Haskell program.
[1]: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/mark.pdf https://www.microsoft.com/en-us/research/wp-content/uploads/...