     transitively.")
   (transitive-dependents [graph key]
     "Returns the set of all things which depend upon key, directly or
-    transitively."))
+    transitively.")
+  (keys [graph]
+    "Returns the set of all keys in graph."))
 
 (defprotocol DependencyGraphUpdate
   (depend [graph key dep]

(ns clojure.tools.namespace.dependency
  "Bidirectional graphs of dependencies and dependent objects."
  (:require [clojure.set :as set]))

(defprotocol DependencyGraph

    (transitive dependencies key))
  (transitive-dependents [graph key]
    (transitive dependents key))
  (keys [graph]
    (clojure.set/union (set (clojure.core/keys dependencies))
                       (set (clojure.core/keys dependents))))
  DependencyGraphUpdate
  (depend [graph key dep]
    (when (depends? graph dep key)
