This repository contains a (partial, WIP) port of the excellent recursion schemes micro-library originally authored by David Barri (@japgolly) to ensure that it works nicely with the Typelevel Cats functional programming library for Scala.
The original library was introduced by a blog post full of practical examples motivating the use of recursion schemes. I highly recommend you check out the whole series.
Add the following to your build.sbt
:
// For cats 1.x
libraryDependencies += "io.github.davidgregory084" %% "schemes-core" % "0.2.0"
I'm currently working on better documentation and examples. In the meantime I recommend you check out:
-
@japgolly's blog series
-
@zainab-ali's amazing talk from Scala eXchange 2017
-
this pull request which ports the code from Zainab's talk from matryoshka to
schemes
.
Contributors are expected to follow the Typelevel Code of Conduct while participating on Github and any other venues associated with the project.
This library would not exist at all were it not for the original work of @japgolly.
Thanks are also due to Tomas Mikula (@TomasMikula) for the unboxed representation of Fix
which both libraries use.
All code in this repository is licensed under the Apache License, Version 2.0. See LICENSE.