--- Revision 393735356538 +++ Revision 323637636337 @@ -6,7 +6,7 @@ connected (keep-indexed ; return the nodes connected to the root, and their index #(let [conn (connected? r %2)] (if conn [conn %1])) g) - candidates (map (fn [[n i]] [(concat (take (dec i) g) (drop i g)) n]) connected)] + candidates (map (fn [[n i]] [(concat (take (dec i) g) (drop i g)) n]) connected)] ; candidates are "new" root nodes, and the remaining graphs (or (empty? g) (and (not (empty? connected)) (some boolean (map #(apply tour? %) candidates)))))))