abstract-algorithm
Advanced tools
Comparing version 0.1.13 to 0.1.14
{ | ||
"name": "abstract-algorithm", | ||
"version": "0.1.13", | ||
"version": "0.1.14", | ||
"description": "Abstract-algorithm for optional reduction of stratifiable lambda terms", | ||
"main": "src/abstract-algorithm.js", | ||
"main": "src/lambda-calculus.js", | ||
"bin": { | ||
@@ -7,0 +7,0 @@ "absal": "src/main.js" |
@@ -9,23 +9,29 @@ # Lamping's Abstract Algorithm | ||
1. Install | ||
- Install | ||
```bash | ||
npm install abstract-algorithm | ||
npm install -g abstract-algorithm | ||
``` | ||
2. Use | ||
- Use as a lib | ||
```javascript | ||
const algo = require("abstract-algorithm"); | ||
const absal = require("."); | ||
// church-encoded exponentiation of 2^2 | ||
const term = ` | ||
two: s.z.(s (s z)) | ||
(two two) | ||
@two #s #z /s /s z | ||
/two two | ||
`; | ||
// evaluates optimally | ||
console.log(algo(term)); | ||
console.log(absal.reduce(term,1)); // 1 = return stats | ||
``` | ||
- Use as a command | ||
```bash | ||
absal fileName.lam | ||
``` | ||
## Bla bla bla | ||
@@ -32,0 +38,0 @@ |
@@ -155,3 +155,4 @@ const I = require("./interaction-combinators.js"); | ||
toNet, | ||
reduce | ||
reduce, | ||
net: I | ||
}; |
1878722
40
2108
49