
On 09/03/10 13:21, Dave Abrahams wrote:
On Fri, Sep 3, 2010 at 2:03 PM, Larry Evans <cppljevans@suddenlink.net> wrote:
What it does do is make implementation of beta reduction easier
And why would a C++ programmer care about making the implementation of beta-reduction easier?
I thought that's essentially what mpl::apply<F,A> does. Let's see, from: http://en.wikipedia.org/wiki/%CE%91_conversion#.CE.B1-conversion there's: Beta-reduction captures the idea of function application. Beta-reduction is defined in terms of substitution: the beta-reduction of ((λV.E) E′) is E[V := E′]. For example, assuming some encoding of 2, 7, *, we have the following β-reductions: ((λn.n*2) 7) → 7*2. Since, as I mentioned, I had trouble understanding how apply worked, and the code seems pretty complicated, at least to me, I was hoping DeBruijn's method would offer simplifications. OTOH, maybe I'm completely missing something. -regards, Larry