abstract-algorithm icon indicating copy to clipboard operation
abstract-algorithm copied to clipboard

unbound variable name 'Lam:' when run on windows

Open lastmeta opened this issue 5 years ago • 0 comments

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?

lastmeta avatar Sep 06 '18 02:09 lastmeta