                                  (first))
 ;;=> To update the "scheduled" ref, we begin by finding the
 ;; ':process-d' in the processes vector
-             instr-in-p-in-scheduled (->> (get p-in-scheduled
-                                               :instructions)
-                                          the-instr-to-fire-id))
-         (filter #(= (:inst-id %)
-                     (first))
+             instr-in-p-in-scheduled (->> (get p-in-scheduled :instructions)
+                                          (filter #(= (:inst-id %)
+                                                      the-instr-to-fire-id))
+                                          (first))
 ;; Then We find the instruction in this process
-                 idx-p-in-scheduled (max 0 (.indexOf @scheduled-ref
-                                                     p-in-scheduled))
-                 idx-inst-in-p-in-scheduled (max 0
-                                                 (.indexOf  (get p-in-scheduled :instructions)
-                                                            instr-in-p-in-scheduled))
+             idx-p-in-scheduled (max 0 (.indexOf @scheduled-ref p-in-scheduled))
+             idx-inst-in-p-in-scheduled (max 0 (.indexOf  (get p-in-scheduled :instructions) instr-in-p-in-scheduled))
 ;;=> We compute the index of the instruction; or we set it at 0
 ;; if it is not found, which means it is the first time it is
 ;; scheduled.

                                                                       locks
                                                                       %)))))
;;=> A set of not locked instructions
               p-incomplete-instrs (set (->> (:instructions  the-process-
                                                             scheduled-parts)
                                             (filter incomplete-instruction?)
                                             (map #(dissoc % :count))))
;;=> A set of incomplete instructions

(ns sandbox.multithread
  (:require [instaparse.core :as insta])
  (:require [clojure.zip :as z])
  (:require [clojure.pprint :refer :all]))
