/schemes

A recursion schemes micro-library

Primary LanguageScalaApache License 2.0Apache-2.0

Schemes

Build Status Coverage Status License Latest Version

Overview

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.

Getting Started

Add the following to your build.sbt:

// For cats 1.x
libraryDependencies += "io.github.davidgregory084" %% "schemes-core" % "0.2.0"

Examples

I'm currently working on better documentation and examples. In the meantime I recommend you check out:

Conduct

Contributors are expected to follow the Typelevel Code of Conduct while participating on Github and any other venues associated with the project.

Acknowledgements

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.

License

All code in this repository is licensed under the Apache License, Version 2.0. See LICENSE.