Work for the 2013 ICFP contest