benji6/combinators-js

S K definition of Y combinator

benji6 opened this issue · 4 comments

Y is the only included combinator that isn't defined and tested in terms of S and K. Help wanted!

Presumably the problem here is that the naive approach overflows the stack because of eager evaluation?

Too hard for me I think...

Well the main problem is I cribbed all the S K derivations from http://www.angelfire.com/tx4/cus/combinator/birds.html but the Y definition has 11 left brackets and 10 right brackets and I can't work out what it's supposed to be...

I have quite a few definitions of Y in terms of other combinators including BML, SLL, UU and LO(LO), but my runtime just throws too much recursion errors with these.

So I'm stuck and don't know enough about this stuff!

S(S)(K)(S(K(S(S)((S(S(S)(K))))))(K))
http://tromp.github.io/cl/LC.pdf