|
Bloody posted:What's a monad? I'm sorry for being another person to talk about this. A monad is when you put a wrapper around a value and make it so it's only possible to access that value with a callback. It's an extremely simple and general concept when you get to the heart of it. Ever use Nullable<T> in C#? Consider an example like this: code:
There's a zillion uses of this pattern that will make your programming life better. Look at all the LINQ stuff, Task<T>, Func<T>, etc. if you're in the .NET world.
|
# ¿ May 1, 2015 06:49 |
|
|
# ¿ Apr 28, 2024 21:55 |
|
I spent a lot of time with How to Design Programs in supplement to my regular college programming classes and it was incredibly helpful. It's what I recommend to everyone starting. It really strips away the stuff beginners should not be worrying about and helps beginners build good habits. I haven't worked with the scheme book people mention often in the same breath but I'm sure it's good too.
|
# ¿ May 1, 2015 17:37 |
|
I really think whoever devised the wikipedia definition of monad should be shot. Math articles on Wikipedia in general are impenetrable gibberish.
|
# ¿ May 4, 2015 16:38 |
|
Seriously, IO and effects and stuff has nothing to do with the definition of a monad. Set that aside when you first learn about them and try playing with a conceptually simple monad instance like Maybe.
|
# ¿ Apr 19, 2016 17:50 |