We present the derivation of a solution to a LISP programming exercise. The derivation is in three steps. First, an inefficient solution is given. Second, the quintessence of a more efficient solution is captured in a number of equalities. Third, an efficient solution is derived from the inefficient one by a number of transformation steps, each of which is justified by the equalities.