    [clojure.core.match :refer [match]]
    [clojure.math.combinatorics :as combo]
    [clojure.string :as str]
+   [com.rpl.specter :as sp]
 
    spyscope.core
    mw.utils

(defn parse-cpy-value
  [cmd]
  (if-let [[_ x y] (re-find (re-matcher #"^cpy (-?\d+) ([a-z]+)$" cmd))]
    {:cmd :cpy-value :x x :y y}))

(defn parse-cpy-reg
  [cmd]


;; Initially, only "a" to "d"
(s/def ::regs (s/map-of string? integer?))
(s/def ::ip   integer?)

(s/def ::computer (s/keys :req-un [::ip ::regs]))

;; since :y doesn't always exists, I might have to remove it
(s/def ::cmd  (s/keys :reg-un [::cmd ::x ::y]))
(s/def ::cmds (s/coll-of ::cmd))



(s/fdef init-computer
        :args (s/cat)
