Solve the ‘split by type’ problem in 4clojure.com.