 (defn -main
   "Main function for k-means"
   [& args]
-  (k-means [[1 2] [3 2] [6 3] [1 8] [9 10] [1 4]] 3))
+  (let [c (k-means [[1 2] [3 2] [6 3] [1 8] [9 10] [1 4] [56 67] [44 53] [43 54] [43 64] [76 56]] 3)] (println c)))


(defn still-moving?
  "Predicate to test if the centroids have not reached equlibrium"
  [c]
  true)

(defn mean
  "Retrieve the mean value of a list"

(defn k-means
  "Perform the actual k-means"
  ([l k]
    (k-means l k (choose-initial-centroids l k) (make-vector k)))
  ([l k c g]
    (let [t c g (cluster g l c) c (mean-centroids g)]
      ; (println g)
      (cond
        (still-moving? t c) ; Keep shifting centroids until equilibrium
          ; (recur nil k c g)
          g
        :else g))))
