Good stuff! Thanks! Especially the trick with indexing so the set accepts first state of buckets.
Beside this you are ignoring the current candidate computation along rest and just put him into nearest bucket. In mine I'm first looking for the potentially the best and finally put him over there. But in general yours looks better is also correct and of course is less computing expensive and as output gives already sorted buckets. First sort can be (sort-by f coll) instead (sort coll) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en