Skip to content

vmchale/recursion_schemes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Vanessa McHale
Aug 23, 2018
e10780a · Aug 23, 2018
Aug 19, 2018
Nov 11, 2017
Aug 17, 2018
Oct 23, 2017
Aug 14, 2018
Aug 23, 2018
Nov 1, 2017
Nov 13, 2017
Jul 13, 2017
Apr 7, 2018
Apr 8, 2018
Aug 14, 2018
Feb 26, 2018
Feb 26, 2018

Repository files navigation

recursion_schemes

Build Status

This is a library providing recursion schemes for Idris. It it is loosely based on Edward Kmett's Haskell library.

Installation

First, install idris-free, comonad and composition. Then:

idris --install recursion_schemes.ipkg

To run the tests, install specdris. Then:

idris --testpkg test.ipkg

Use

The classic paper Functional programming with bananas, lenses, envelopes and barbed wire is the inspiration behind the Haskell library and is the standard reference on the topic. You may also find Law and Order in Algorithmics to be of use.

Examples

In the Test.Spec module there are several examples, including a catamorphism, a zygomorphism, a mutumorphism, an Elgot algebra, a paramorphism, a dynamorphism, and a hylomorphism.

Documentation

You can find documentation here.