Stories
Slash Boxes
Comments

SoylentNews is people

posted by cmn32480 on Monday December 07 2015, @06:29PM   Printer-friendly
from the way-over-this-editors-head dept.

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.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 0) by Anonymous Coward on Tuesday December 08 2015, @12:44PM

    by Anonymous Coward on Tuesday December 08 2015, @12:44PM (#273305)

    OP here. Popular? With who? Circle jerking nerds who mentally high fiving each other because they all like XKCD? I couldn't stand his webcomics and the incessant linking since people first started linking his drek on the green site years ago.

  • (Score: 2) by Tork on Tuesday December 08 2015, @06:06PM

    by Tork (3914) Subscriber Badge on Tuesday December 08 2015, @06:06PM (#273521)
    Right, you want to look cool. It's not working, but at least we get it.
    --
    🏳️‍🌈 Proud Ally 🏳️‍🌈