code-reviews

2019-12-02T14:04:35.038300Z

do you want to recursively dedupe or just one pass?

2019-12-02T14:07:13.038500Z

you can use partitionand mapcat

2019-12-02T14:07:36.038700Z

(def r (range 1 10))
(->> r (partition 2 2) 
       (mapcat (fn [[a b]] ;;apply haversine here
                  (if ( < a 5) [a b] [b]))))

2019-12-02T14:08:49.039Z

but if [a b c d] are all close , this will generate [a c] or similar, not [a]