Added answer to problem 1 by clojure.