+(defn intcode [{:as state :keys [memory output]}]
+ (cond ; quit if :exit, step and return state if :step, else loop
+ (get state :exit) {:memory memory :output output :exit true}
+ (get state :step) (perform-operation state)
+ :else (recur (perform-operation state))))
+