Recursion schemes compatible with flow-static-land
npm install static-land-recursion-schemesstatic-land-recursion-schemes
==================
Recursion schemes library, compatible with flow-static-land.
npm install static-land-recursion-schemes
`Overview
This provides a small core set of recursion schemes. Functions for composing schemes are not provided. Documentation is in-process, and will be written as a set of guides here.Provided schemes
Exports from "static-land-recursion-schemes/lib/schemes":
`
type Algebra = HKT => A;
function cata(Algebra, Fix, Functor) : A
const catamorphism = cata;type Coalgebra = A => HKT;
function ana(Coalgebra, A, Functor) : Fix
const anamorphism = ana;
type RAlgebra = (Fix, HKT) => A;
function para(RAlgebra, Fix, Functor) : A
const paramorphism = para;
type RCoalgebra = A => HKT, A>>;
function apo(RCoalgebra, A, Functor) : Fix
const apomorphism = apo;
function hylo(Algebra, Coalgebra, A, Functor) : B
const hylomorphism = hylo;
function zygo(Algebra, (HKT) => A, Fix, Functor) : A
const zygomorphism = zygo;
function gApo(Coalgebra, A => HKT>, A, Functor) : Fix
const generalizedApomorphism = gApo;
type NaturalTransformation = (HKT) => HKT;
function prepro(NaturalTransformation, Algebra, Fix, Functor) : A
const prepromorphism = prepro;
function postpro(NaturalTransformation, Coalgebra, A, Functor) : Fix
const postpromorphism = postpro;
`Exports from "static-land-recursion-schemes/lib/Fix":
`
type Fix = Inclass In {
term: HKT>;
constructor(term: HKT>) {
this.term = term;
};
};
function out(term: Fix) : HKT>
``