Exercise 1.33 in Emacs Lisp