             (return config-ctx system)
             dks)))
 
+(defn- stop-system*
+  [system]
+  (let [sd (system-destructor system)]
+    (run-state sd system)))
+
 (defn stop-system!
   "given a Deferred<[_, system]> (i.e. the result of one of the
    config-ctx value fns) stop the system, running

  (d/chain
   dsys
   (fn [[_ system]]
     (let [sd (system-destructor system)]
       (run-state sd system)))))

(defn start-system!
  "given a system-builder, start a system with the seed config

  (d/chain
   dsys
   (fn [[_ system]]
     (system-map* system))))

(comment
  (require '[deferst.system :as dfs])
