solved problem 17 in clojure