We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I know this is an old comment, but if anyone else has this issue:
The only thing you're missing is the eta-reduciton on the x at the end. The point where you can recognize the reduction is on a line that would be second to last in your series of transformations:
B(CI)(B(BK)T[\x.(C(CII)x)])
Here would be the easiest place to recognize the eta-reduction, because you can lump the C(CII) together as E which would then follow the eta-reduction rule:
T[\x.Ex]=>T[E]
so:
T[\x.C(CII)x]=>T[C(CII)]=>C(CII)
instead of:
T[\x.C(CII)x]=>B(C(CII))T[\x.x]=>B(C(CII))I
which gives you the proper final term for that test case
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Down With Abstractions
You are viewing a single comment's thread. Return to all comments →
I know this is an old comment, but if anyone else has this issue:
The only thing you're missing is the eta-reduciton on the x at the end. The point where you can recognize the reduction is on a line that would be second to last in your series of transformations:
Here would be the easiest place to recognize the eta-reduction, because you can lump the C(CII) together as E which would then follow the eta-reduction rule:
so:
instead of:
which gives you the proper final term for that test case