Re:Show HN: A lambda expression visualizer for the web
by Sniffnoy on Saturday February 16, 2013 @04:01AM
(#5230949)
Not sure what you mean by "equivalent terms look the same". I'm not clear on how e.g. ##(2 1) and #1 look the same. Going by your remark about name collisions, I must ask if you are thinking of alpha-equivalence? (Which certainly is rendered unnecessary by the notational system.)
And thank you for making/hopefully fixing this!
Re:Show HN: A lambda expression visualizer for the web
by notb on Saturday February 16, 2013 @04:24AM
(#5230997)
Oh I see. Yes I was thinking of alpha-equivalence, sorry.
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...
Re:Show HN: A lambda expression visualizer for the web
by Sniffnoy on Sunday February 17, 2013 @12:47AM
(#5234330)
I don't know what I might refer you to. Beta reduction requires recognizing subtrees of the form (#T S) (where T and S are any subtrees), eta reduction just requires recognizing subtrees of the form #(T 1) (where T is any subtree).
No idea about animation. It's really not something I'd thought about, I have to say...
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.