|
|
|
|
|
by vans
3842 days ago
|
|
Like Erik Meijer said in his course : there is nothing special or magic about monads. They don't deserve all the fuzz arround them. If you don't get why monads are so awesome, maybe that's a proof that you understood them. Because there is nothing special !! A monad is just a type with 2 functions defined. Like an interface with two methods in OO langages. The 2 functions have to respect some laws but you can imagine whatever implementation for the 2 functions as long as the laws are observed (et type signature of course). You could invent a total different implementation for the list monad, for the maybe monad, etc (if you respect the laws). There is no hidden ultra powerfull meaning which implies only one implementation. The best paper on monads i ever read is an ascii art one, by Graham Hutton :
http://www.cs.nott.ac.uk/~pszgmh/monads |
|
Could you show such a different implementation for either list or maybe?