Recursion schemes are elegant and useful patterns for expressing general computation. In particular, they allow you to 'factor recursion out' of whatever semantics you may be trying to express when interpreting programs, keeping your interpreters concise, your concerns separated, and your code more maintainable.
...
In this article I want to avoid building up the machinery meticulously and instead concentrate mostly on understanding and using Edward Kmett's recursion-schemes library, which, while lacking in documentation, is very well put together and implements all the background plumbing one needs to get started.In particular, to feel comfortable using recursion-schemes I found that there were a few key patterns worth understanding:
--Factoring recursion out of your data types using pattern functors and a fixed-point wrapper.
--Using the 'Foldable' & 'Unfoldable' classes, plus navigating the 'Base' type family.
--How to use some of the more common recursion schemes out there for everyday tasks.
(Score: 3, Interesting) by E_NOENT on Monday December 07 2015, @08:10PM
My ex-favorite window manager was written in Haskell so I kinda had to dive in a little
Xmonad? I'm still on it after 2 (3?) years. Love it, can't bring myself to switch, though I've tried. Glad to run into another fan.
I'm not in the business... I *am* the business.