     (into
      (reduce
       (fn [result peer-ids]
-        (conj result (SplitAmong. (map (comp vector peer->vm) peer-ids)
-                                  (map #(vector (get task->node [job-id %])) task-ids))))
+        (conj result
+              (SplitAmong.
+               (map (comp vector peer->vm) peer-ids)
+               (map #(vector (get task->node [job-id %])) task-ids))))
       []
       (partition capacity selected))
      (ban-smaller-sites replica jobs peer->vm task->node site->peers-mapping rejected))))

   (fn [{:keys [selected rejected] :as result} site peer-ids]
     (if (>= (count selected) total)
       (update-in result [:rejected] into peer-ids)
       (let [difference (- total (count selected))]
         (-> result
             (update-in [:selected] into (take difference (drop-last (mod (count peer-ids) size) peer-ids)))
             (update-in [:rejected] into (take-last (mod (count peer-ids) size) peer-ids))))))
   {:selected []
    :rejected []}
   site->peers))

   site->peers-mapping))

(defn global-saturation-lower-bound [replica job-id task-ids]
  (let [saturation-values
        (remove nil?
                (map #(get-in replica [:task-saturation job-id %])
                     task-ids))]
    (if (seq saturation-values)
      (apply min saturation-values)
      Double/POSITIVE_INFINITY)))
