Skip to content

Commit 5e87d51

Browse files
authored
Merge pull request #8 from nwjsmith/doc-fix
Ensure examples are executable
2 parents 9667aa2 + db0bab7 commit 5e87d51

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Recursively compare Clojure data structures, and produce a colorized diff of the
1919
``` clojure
2020
(require '[lambdaisland.deep-diff :as ddiff])
2121

22-
(pretty-print (diff {:a 1 :b 2} {:a 1 :c 3}))
22+
(ddiff/pretty-print (ddiff/diff {:a 1 :b 2} {:a 1 :c 3}))
2323
```
2424

2525
### Diffing
@@ -29,7 +29,7 @@ structure that contains markers for insertions, deletions, or mismatches. These
2929
are records with `-` and `+` fields.
3030

3131
``` clojure
32-
(diff {:a 1 :b 2} {:a 1 :b 3})
32+
(ddiff/diff {:a 1 :b 2} {:a 1 :b 3})
3333
{:a 1, :b #lambdaisland.deep_diff.diff.Mismatch{:- 2, :+ 3}}
3434
```
3535

@@ -44,9 +44,9 @@ For fine grained control you can create a custom Puget printer, and supply it to
4444
`pretty-print`.
4545

4646
``` clojure
47-
(def narrow-printer (lambdaisland.deep-diff/printer {:width 10}))
47+
(def narrow-printer (ddiff/printer {:width 10}))
4848

49-
(pretty-print (diff {:a 1 :b 2} {:a 1 :b 3}) narrow-printer)
49+
(ddiff/pretty-print (ddiff/diff {:a 1 :b 2} {:a 1 :b 3}) narrow-printer)
5050
```
5151

5252
For more advanced uses like incorporating diffs into your own Fipp documents, see `lambdaisland.deep-diff.printer/format-doc`, `lambdaisland.deep-diff.printer/print-doc`.

0 commit comments

Comments
 (0)