@calculemus/abt-lambda
Using @calculemus/abt to interpret lambda-calculus
Last updated 2 years ago by calculemus .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @calculemus/abt-lambda 
SYNC missed versions from official npm registry.

Lambda calculus

npm version Build Status Dependency Status Dev Dependency Status Coverage Status

Demonstration of the @calculemus/abt library.

Based on Peter Sestoft's Demonstrating Lambda Calculus Reduction.

Using the evaluator

You can try the following code over at RunKit:

const abtLambda = require("@calculemus/abt-lambda");

// Parse, evaluate, and print as different steps
const [fv, e] = abtLambda.parse("x (x => (x => x) y x)");
console.log(abtLambda.toString(e));
const [gas, norm] = abtLambda.callByName.normalize(100, fv, e);
console.log(abtLambda.toString(norm));

// Do all of that at once
console.log(abtLambda.evaluate("(x => y => x y) (y => x) z"));

Current Tags

  • 0.0.6                                ...           latest (2 years ago)

6 Versions

  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 6
This Week 6
This Month 6
Last Day 0
Last Week 1
Last Month 7
Dependencies (5)
Dev Dependencies (13)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |