Code I wrote as an exercise (hosted at jobs.workdistributed.com)