Solution of the extra problem set of the book How to Design Programs (also known as HtDP) (www.htdp.org)