 (defn cleared-clusters
   "Clears a cluster's members so that new ones can be assoced on a new clustering step"
   [clusters]
-  (into {} (map #(vector (:id %) (assoc % :members [] :positions [])) clusters)))
+  (->> clusters
+       (map (fn [cluster]
+              [(:id cluster)
+               (assoc cluster :members [] :positions [])]))
+       (into {})))
 
 
 (defmulti weighted-mean

  (:refer-clojure :exclude [* - + == /])
  (:require [taoensso.timbre.profiling :as profiling
             :refer (pspy pspy* profile defnp p p*)]
            [plumbing.core :as pc
             :refer (fnk map-vals <-)]
            [plumbing.graph :as gr]

  "Append an item to a cluster, where item is a (mem_id, vector) pair"
  [clst item]
  (assoc clst
         ; Note that order is important here, and assumed to be the same for the weighted-mean call in `cluster-step`.
         :members (conj (:members clst) (first item))
         :positions (conj (:positions clst) (last item))))

