Skip to content

Commit

Permalink
Modernized README.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrupp committed Mar 23, 2013
1 parent 01d2b47 commit 0dc3a9b
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@ Simple graph representation and manipulation in Clojure.
## Usage

```clojure
(let [g (make-graph)]
(add-edge g :a :b)
(add-edge g :a :c))
(-> (make-graph)
(add-edge :a :b)
(add-edge :a :c))
(doto (make-graph)
(add-edge :a :b)
(add-edge :a :c))
(def g (-> {}
(add-edge 0 1)
(add-edge 0 2)
(add-edge 0 5)
(add-edge 0 6)
(add-edge 3 4)
(add-edge 4 6)
(add-edge 5 3)
(add-edge 5 4)))

(dft g 0) ;=> [0 1 2 5 3 4 6]
(bft g 0) ;=> [0 1 2 5 6 3 4]
(dft g 5) ;=> [5 0 1 2 6 4 3]
(bft g 5) ;=> [5 0 3 4 1 2 6]
```

## License
Expand Down

0 comments on commit 0dc3a9b

Please sign in to comment.