User defined function, recursion and passing self along

Here’s a great resource to learn about combinators in general, if Ruby as a sample language works for you: Kestrels, Quirky Birds, and Hopeless Egocentricity