 
   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]))]
+  (let [deps (deps->set deps)]
     (send-off dep-state* on-deps* key deps handler)))
 
 (defn satisfy-deps

                     {:satisfied #{}
                      :todo (deps :done)
                      :done []})))

  overtone.libs.deps
  (:require [clojure.set :as set]))

;; A representation of the state of the dependencies:
;; :satisified - a set of keywords representing ids for each of the satisfied
;;               dependencies
;; :todo       - a list of functions with associated dependencies which need
;;               to be executed when those dependencies are met
;; :done       - a list of functions with associated dependencies which have
;;               already been executed as their dependencies have been met
(defonce dep-state* (agent {:satisfied #{}
                            :todo []
                            :done []}))
