solve problem 2 in clojure