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.
2 parents 9033667 + f3fefd1 commit 0c44a2aCopy full SHA for 0c44a2a
src/lambda-calculus.js
@@ -42,7 +42,7 @@ class L {
42
this.body = body;
43
}
44
free() {
45
- const r = this.body.free();
+ const r = this.body.free?.() || new Set ;
46
r.delete(this.name);
47
return r;
48
@@ -169,7 +169,7 @@ export function toInt(term) {
169
function parse(code) {
170
function parseTerm(env,code) {
171
function wrap(name,term) {
172
- const FV = term.free(); FV.delete("()");
+ const FV = term.free?.() || new Set ; FV.delete("()");
173
if ( config.purity === "Let" )
174
return Array.from(FV).reduce( (tm,nm) => {
175
if ( env.has(nm) ) {
0 commit comments