GSoC/GCI Archive
Google Code-in 2010 Parrot Foundation and The Perl Foundation

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:

  1. Download and install Parrot and Winxed. Make sure they both work on your machine.
  2. Write a Y-Combinator implementation in Winxed. Feel free to follow any existing examples that you want
  3. 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