foreclojure-android
foreclojure-android copied to clipboard
Solution appears to pass, but not accepted by server.
The following is my solution for problem 50. The app marks this solution as correct, but warns that it was rejected by server. I have not had this issue with any other problem so far.
(fn split-by-type [sqn]
(loop [sqn sqn
sorted {}]
(if (empty? sqn)
(vals sorted)
(let [x (first sqn)
t (type x)]
(recur
(rest sqn)
(if (contains? sorted t)
(update sorted t conj x)
(assoc sorted t (vector x))))))))