                      {:satisfied #{}
                       :todo (deps :done)
                       :done []})))
+
+(defn satisfied?
+  "Returns true if all the deps (specified either as a single dep or a
+  collection of deps) have been satisfied."
+  [deps]
+  (let [deps (deps->set deps)
+        satisfied (:satisfied @dep-state*)]
+    (set/superset? satisfied deps)))
+
+(defn satisfied-deps
+  "Returns a set of all satisfied deps"
+  []
+  (:satisfied @dep-state*))


  Uses an agent so it's safe to call this from within a transaction."
  [deps key handler]
  (let [deps (if (coll? deps)
               (set deps)
               (set [deps]))]
    (send-off dep-state* on-deps* key deps handler)))

(defn satisfy-deps

     :done t-done
     :todo t-todo}))

(defn- deps->set
  "Converts deps to a deps-set. Deals with single elements or collections."
  [deps]
  (if (coll? deps)
    (set deps)
    (set [deps])))

(defn on-deps
  "Specify that a function should be called once one or more dependencies
  have been satisfied. The function is run immediately if the deps have
