so when i say that,
i mean that
but i forgot how all of my previous code works so i have to start over again.
can some one give me a starting code?
(waiting @bh to continue the discution and for @theaspiringhacker,you can join too)
wow bh is staying up late
Oh right. Technically, in λ calculus all functions have exactly one input; if you want more, you curry the function: (λ a . (λ b . etc. In my version I cheated by making separate constructors and callers for functions of two and three inputs. (You never really need more than that.)
Because Snap! doesn't use normal order evaluation, you have to make IF be a special form, in order for it to work in recursive functions. I dunno if that's the problem you're seeing.
As for the X out of scope, does your implementation of lambda manage to evaluate the procedure body in an environment in which its parameter is bound to the argument value in the call? You may need to build explicit environments as alists or something instead of relying on Snap! variables.