                                  (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.

                                         (first))]
;;=> Here we prepare the processes scheduled parts and take only
;; the relevant to the particular 'process-id'.
    (if-let [the-instr-to-fire-id (find-inst-to-be-fired-in-
                                   process @locks-ref
                                   (:process-id the-process)
                                   the-process-instrs
                                   the-process-scheduled-parts )]

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