2 ms·
I think there must be typos in your K and S - the parentheses do not match. I get (with no warranty express or implied): let K = A(A(A))(A(A(A))(A)(A)(A)(A)(A
by voidmain 1y ago
I think there must be typos in your K and S - the parentheses do not match. I get (with no warranty express or implied):
let K = A(A(A))(A(A(A))(A)(A)(A)(A)(A));
let S = A(A(A(A)(A(A)(A(A)))(A(A(A(A)(A(A)))))))(A)(A);
> Eager languages can be made lazy by wrapping arguments in lambdas with dummy arguments
So, something like this?
let A = x => y => z => () => x()(z())(y()(w=>z()));
- tromp 1y agoIt's possible that I messed up in transcribing from my working code K = A (A A) (A (A A) A A A A A); S = A (A (A A (A A (A A))(A (A (A A (A A)))))) A A; that assumes application is left associative. > So, something like this? > let A = x => y => z => () => x()(z())(y()(w=>z())); The javascript code I linked to would change an application like x(z) in A's definition to x ((a) => z(a)), which is really just an eta-expansion of the argument, and would similarly treat the other 2 applications in the definition.