News for hackers. Stuff that matters.
Re:Haskell Problems for a New Decade by lgas on Friday January 24, 2020 @10:45PM (#22144509)
That's not a particularly great example though because 99 bottles of beer is not a particularly stateful computation. You could easily do it without state at all like this: https://gist.github.com/lgastako/2e7dfd6b1118bb408ff114a4be4...

On the other hand this blog post http://www.haskellforall.com/2013/05/program-imperatively-us... demonstrates how one of the bits of Haskell that some people find complex (lenses) can be used together with the state monad to provide an "imperative-like" experience that's even nicer than most imperative languages.

Re:Haskell Problems for a New Decade by smitty1e on Friday January 24, 2020 @11:19PM (#22144644)
There were other examples, but figuring out how to deal with state is the most arcane and mystical aspect of haskell.