We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec111ff commit 1bc3284Copy full SHA for 1bc3284
src/lambda-calculus.js
@@ -417,4 +417,4 @@ function printStackTrace(error, term, stack) {
417
console.error( stack.slice(stackCutoff).reverse().map( v => `\twhile evaluating ${ v }`).join('\n') );
418
}
419
420
-Object.defineProperty( Function.prototype, "valueOf", { value: function valueOf() { return toInt(this); } } );
+Object.defineProperty( Function.prototype, "valueOf", { value: function valueOf() { if (this.term) return toInt(this); else return this; } } );
0 commit comments