         (let [inputs ((:inputs switch) circuit)]
           (if (not-any? nil? inputs)
             (recur more (assoc circuit (:target switch) (apply (:fn switch) inputs)))
-            ; inputs for this switch aren't set, so put it at the end of the list and keep going 
+            ; inputs for this switch aren't set, so put it at the end of the list 
             (recur (conj (vec more) switch) circuit)))
         circuit))))
 

              "NOT" #(bit-not %)
              "SET" #(identity %)})

(defn make-input
  [x]
  (fn [circuit]
    (if (re-find #"^[0-9]+$" x)

        parts (str/split input #" ")
        commands (set (keys cmd->fn))
        cmd (or (first (filter commands parts)) "SET")
        operands (map make-wire (remove commands parts))]
    {:inputs (fn [circuit] (map #(% circuit) operands))
     :fn (cmd->fn cmd)
     :target target}))

(def switches (->> (slurp "input.txt")
                   (str/split-lines)
