4 ms·
Mr. Muppet, I am not a Haskell expert, but I had a similar coding issue that I blogged about a while back. I was threading a score value through some code that
by paulrpotts 12y ago
Mr. Muppet, I am not a Haskell expert, but I had a similar coding issue that I blogged about a while back. I was threading a score value through some code that calculates an updated gameboard. The solution (well, one solution) was a writer monad. That got me over the hump a little further towards understanding monads, and the conventional wisdom nowadays seems to be that teaching beginning Haskell developers how to _use_ them is more effective than pointing them at endless monad tutorials or articles on category theory.
If that sounds helpful, see: http://praisecurseandrecurse.blogspot.com/2013/07/the-polar-game-in-haskell-day-5-12.html http://praisecurseandrecurse.blogspot.com/2013/07/the-polar-... and see also the next post in the blog. Then maybe go from there!
- AnimalMuppet 12y agoThat's actually rather helpful, especially the "important stuff, but not the point" line. That's a bigger deal than my question.
- paulrpotts 12y agoGlad to hear it. I think once you've used one of the monads the whole concept starts to make a lot more practical sense.