Partial solution to the ICFP Programming Contest 2014