Programming With Nothing

The idea is to implement some basic data structures and control flow under the constraint of only being allowed to create and call procs.

Getting started

All code uses the -> syntax, so Ruby 1.9 is required.

If you are brave, the challenge branch has a set of pending specs and an empty implementation file. Can you make them all pass without breaking any of the rules? Use bundle install to set up RSpec, then just type rspec to run the specs. (To use autotest, run gem install ZenTest and then autotest.)

If you are afraid, the story branch contains a series of commits which fill out the implementation until all the specs pass.

The more complex Y combinator is a tidier way to define a recursive function, but in Ruby it loops forever; try the Z combinator instead.

If you're already familiar with functional programming, beware that operation names and argument order have been chosen to be familiar to Ruby programmers, e.g. UNSHIFT (vs. CONS) takes a list as its first (vs. last) argument. If you are upset, see the pedant branch.