Deriving Y-Combinator in Scheme

Few weeks back I finished an amazing book called "Little Schemer". It is a very short book but it probably has the most profound effect on me when it comes to programming.

The authors took the Socratic style question/answer approach. It starts from the basics and slowly gears up to concepts like Y-Combinator and even the last chapter is about writing an interpreter.

Honestly, I had to go back and forth on understanding the Y-Combinator derivation but I really had an "Aha" moment when I finally got it. After reading up this book, I also read and understood Lambda Calculus e.g. the idea of using functions to represent arithmetic operations is really cool. 

Let's say we are using a programming language that doesn't support numbers or booleans. All that language provides is lambda. Because of church numerals, we can count, add, subtract, divide and even multiply just by using lambdas. Cool, no? Here is a paper in case you are interested in learning more about Church numerals.

So after reading the "Little Schemer", I set out on deriving Y-Combinator in Scheme and I made a PDF which is available below. I hope you enjoy it. Please feel free to let me know corrections or comments.