Rem's solution to the exercises in cpl