        (filter #(= (:inst-type %) :lock))
        (map #(hash-map :lock-id (% :inst-id) :lock-idx (.indexOf instructions %)))))
 
-(defn the-locks-inst-depends-on
+(defn locks-inst-depends-on
   [instructions instruction]
-  (let [the-inst-idx (.indexOf instructions instruction)]
+  (let [inst-idx (.indexOf instructions instruction)]
     (->> (all-lock-indices instructions)
-         (filter #(> the-inst-idx (:lock-idx %) ))
-         (map :lock-id)
-         (into []))))
+         (filter #(> inst-idx (:lock-idx %) ))
+         (mapv :lock-id))))
 
 (defn lock [locks process-id lock-id]
   (assoc locks lock-id {:locker process-id :locked true}))

       (* 2)))

(defn parse-processes [language programs]
  (vec (map #(fire-process language
                             (:program %)
                             (:process-id %)
                             (:priority %))
            programs)))

(defn schedule-programs [language programs]
  (let [processes (parse-processes language programs)



(defn add-times [instructions]
  (mapv #(assoc % :times []) instructions))

(defn prepare-scheduled [processes]
  (mapv #(update % :instructions add-times) processes))

(defn prepare-locks [processes]
  (->> (ps->is processes)
