Write a Y-Combinator in Winxed
completed by: rfw
mentors: whiteknight
Task Description: The Y-Combinator is a software tool that is used in some functional languages to help with certain types of recursion algorithms. Understanding the Y-Combinator is very hard, but implementing it is not (if the programming language used supports all the features!).
The Y-Combinator has been written before in PIR, and we've proven that it can be written and made to work on Parrot.
Winxed is a medium-level programming language for the Parrot virtual machine which has syntax similar to JavaScript. Winxed code is currently compiled to PIR for execution on Parrot. We think that Winxed supports all the necessary features correctly to implement a Y-Combinator.
The task of the student is to prove this guess.
Steps to Complete:
- Download and install Parrot and Winxed. Make sure they both work on your machine.
- Write a Y-Combinator implementation in Winxed. Feel free to follow any existing examples that you want
- If it works, use your new Y-Combinator to calculate the factorial of 10. Again, feel free to follow any existing examples if you want
Links: http://whiteknight.github.com/2009/09/15/y_combinator_in_pure_pir.html, http://code.google.com/p/winxed/