Show HN: A lambda expression visualizer for the web(brycec.github.com) |
Show HN: A lambda expression visualizer for the web(brycec.github.com) |
Unfortunately there appear to be some errors. Try entering the following expression:
#(##2 1)
This, if I've understood the notation correctly, means λx.(λy.λz.y)x. Thus, it should reduce to λx.λz.x, or ##2. However, the program instead reduces it to ##1, or λx.λz.z.
So, something's really wrong here.
And, that is definitely a bug, thanks. I think I could solve it by lazy evaluation (it wouldn't reduce that term) but I think I just need to correctly change vars when they move scope.
And thank you for making/hopefully fixing this!
Now I must ask, do you know any good papers/algos on that reduction? And how would you envision animating? It seems a bit like a lambda/var pair just fall off...
No idea about animation. It's really not something I'd thought about, I have to say...