diff options
Diffstat (limited to 'src/clojure/contrib/graph.clj')
-rw-r--r-- | src/clojure/contrib/graph.clj | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/clojure/contrib/graph.clj b/src/clojure/contrib/graph.clj index 5890a8f8..34a3454e 100644 --- a/src/clojure/contrib/graph.clj +++ b/src/clojure/contrib/graph.clj @@ -56,8 +56,7 @@ ) (defn- post-ordered-visit - "Starting at node n, return a sequence of a post-ordered walk of the - graph." + "Starting at node n, perform a post-ordered walk." [g n [visited acc :as state]] (if (visited n) state @@ -84,7 +83,7 @@ acc (let [[nv comp] (post-ordered-visit rev (first stack) - [visited []]) + [visited #{}]) ns (remove nv stack)] (recur ns nv (conj acc comp)))))] (step po #{} []))) |