Graph algorithms in clojure