:lambda: calculus

Stuff about math and :lambda:!

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

You could start here:

Hmm?
It is not a lambda calculus starter
It is a parser

I have trouble making variadic variable inputs for the :lambda: function
image

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.)

okay i'll curry it

I don't under stand how this works:
image

Where'd you find it? It looks to me like @warped_wart_wars's code, certainly not mine. And it looks like it uses Jens's new metaprogramming support.

Yes it is
And I don't know what jens did to it

It is my code.

here

i dont like the restricted inputs either. here's a modified version that lets you do whatever you want if youd like.

But bh don't allow that for :lambda: calculus

oh okay well by all means, do it the correct way!

Is this correct currying?
untitled script pic (3)
hello???

Yes.

But it doesn't look right
untitled script pic (4)

Yeah, I know. What can I say, the Snap! UI wasn't designed for lambda calculus.


The ?: block keeps breaking other blocks
untitled script pic (5)

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.

AaAaAaAaAahhhhhhhh
i'll stick to call and grey rings