abstract-algorithm
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -33,4 +33,4 @@ var algo = require("./.."); | ||
C: a.b.c.c | ||
X: (A (A (A (A (A (B (B (B (B (A (B (B (B (B (B (A (A (A (B (B (A (B (A (B (A (A (A (A (B (A (A (A C)))))))))))))))))))))))))))))))) | ||
Y: (A (A (B (B (B (B (B (B (A (B (A (B (B (B (A (A (A (B (A (A (B (A (A (B (B (A (B (B (B (A (A (A C)))))))))))))))))))))))))))))))) | ||
X: (B (A (A (A (A (B (A (A (A C))))))))) | ||
Y: (B (B (A (B (B (B (A (A (A C))))))))) | ||
@@ -37,0 +37,0 @@ (binFold (add X Y)) |
@@ -21,3 +21,3 @@ var algo = require("./.."); | ||
(binFold (binAdd X Y)) | ||
(binAdd X Y) | ||
`; | ||
@@ -24,0 +24,0 @@ |
{ | ||
"name": "abstract-algorithm", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Abstract-algorithm for optional reduction of stratifiable lambda terms", | ||
@@ -5,0 +5,0 @@ "main": "src/abstract-algorithm.js", |
@@ -25,3 +25,7 @@ // Performs the abstract algorithm by converting λ-terms to | ||
var term = netToLambda(net); | ||
return {term: term, stats: net.stats}; | ||
return debug === true | ||
? {term: term, stats: net.stats} | ||
: typeof debug === "function" | ||
? debug(term, stats) | ||
: term; | ||
} |
437
370927