VictorTaelin / abstract-algorithm

Optimal evaluator of λ-calculus terms.
268 stars 16 forks source link

unbound variable name 'Lam:' when run on windows #19

Open lastmeta opened 6 years ago

lastmeta commented 6 years ago

I cloned the repo and ran the exmaple lambda-calculus.js and got this error:

...
Evaluating it with JavaScript:
Result: a.b.c.d.(a e.f.g.h.(e i.j.k.l.((j m.n.o.p.(o q.r.s.t.t)) m.n.o.p.((n q.r.s.t.(s u.v.w.x.x)) q.r.s.t.((r u.v.w.x.(w y.z.ab.bb.bb)) u.v.w.x.((v y.z.ab.bb.(ab cb.db.eb.fb.fb)) y.z.ab.bb.bb))))))
Pretty: λλ(1 (1 (1 (1 0))))

Evaluating it with Lamping's algorithm (oracleless):

C:\repos\abstract-algorithm\src\lambda-calculus.js:54
          throw "Unbound variable '" + nam + "'.";
          ^
Unbound variable 'Lam:'.

seems as though its coming from

// An oracleless implementation of the λ-calculus inside itself.
var lambda = `
  Lam:      bod. l.a.b.v.(l bod)
...

I'm not sure why it's not interpreting that correctly. could it have anything to do with me being on windows?