3 ms·
There are some amazing things you can do with free monads, although I must confess to not having my head completely wrapped round them yet: There are some grea
by boothead 13y ago
There are some amazing things you can do with free monads, although I must confess to not having my head completely wrapped round them yet:
There are some great links in this SO answer:
http://stackoverflow.com/questions/6941904/recursion-schemes-for-dummies http://stackoverflow.com/questions/6941904/recursion-schemes...
Especially Tim William's talk here:
https://github.com/willtim/recursion-schemes/raw/master/slides-final.pdf https://github.com/willtim/recursion-schemes/raw/master/slid...
- dons 13y agoSee also free applicatives. We use these extensively at work. E.g. http://gergo.erdi.hu/blog/2012-12-01-static_analysis_with_applicatives/ http://gergo.erdi.hu/blog/2012-12-01-static_analysis_with_ap... Amazing when entire DSL programs turn into 1 line calls.
- boothead 13y agoFunny coincidence - In the place I work this is done with a bajillion lines of python. The entire DSL turns into a bowl of spaghetti with worms hidden throughout!
- MichaelAza 13y ago"I must confess to not having my head completely wrapped round them yet" My thoughts exactly. That's the thing about Haskell. I love the elegance and enjoy the mathematics but it seems it takes me months at a time before something clicks. One reason why I haven't used it for any "real" project.
- Martijn 13y agoYou don't really need to understand all these things in order to build "real" things with it. Just build something without caring too much whether an experienced Haskell programmer would find it elegant enough. Most of the "clicks" I've had is when I'd already built something in a naive way (that worked perfectly) and someone showed me an alternative, more elegant way in which it could be written.
- boothead 13y agoMy approach is to measure my progress by how much less stupid I feel the n+1th time I read the material again. I hope if I just keep chipping away it will enter my brain by a process of osmosis.