https://github.com/vmchale/recursion_schemes
Recursion schemes for Idris
https://github.com/vmchale/recursion_schemes
control-flow idris idris-ecosystem recursion recursion-schemes
Last synced: 7 days ago
JSON representation
Recursion schemes for Idris
- Host: GitHub
- URL: https://github.com/vmchale/recursion_schemes
- Owner: vmchale
- License: bsd-3-clause
- Created: 2017-07-14T02:24:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-23T22:06:25.000Z (over 7 years ago)
- Last Synced: 2026-01-11T16:37:02.364Z (about 1 month ago)
- Topics: control-flow, idris, idris-ecosystem, recursion, recursion-schemes
- Language: Idris
- Size: 182 KB
- Stars: 64
- Watchers: 4
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# recursion_schemes
[](https://travis-ci.org/vmchale/recursion\_schemes)
This is a library providing recursion schemes for Idris. It it is loosely based
on Edward Kmett's [Haskell
library](https://hackage.haskell.org/package/recursion-schemes).
## Installation
First, install [idris-free](https://github.com/idris-hackers/idris-free),
[comonad](https://github.com/vmchale/comonad) and [composition](https://github.com/vmchale/composition). Then:
```
idris --install recursion_schemes.ipkg
```
To run the tests, install [specdris](https://github.com/pheymann/specdris).
Then:
```
idris --testpkg test.ipkg
```
## Use
The classic paper [Functional programming with bananas, lenses, envelopes and
barbed wire](https://link.springer.com/chapter/10.1007/3540543961_7) is the
inspiration behind the Haskell library and is the standard reference on the
topic. You may also find [Law and Order in
Algorithmics](https://pdfs.semanticscholar.org/7ca8/326eb63f32502c0fc2324b6217a7bc7e8af4.pdf)
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](https://vmchale.github.io/recursion_schemes/index.html).