2
2
3
3
Clojure-navigation contains utilities for navigating data and/or code. For example:
4
4
5
- * Mount a data structure and navigate it with filesystem-like commands. Each appropriate command
6
- pretty-prints the first 20 rows of the current data structure. Data structure listings are automatically
7
- paged so you're less likely to blow up your REPL by inadvertently listing a huge data structure.
8
- At the same time, the current object pointed-to by the (pwd) is always available so you can
5
+ ## Mount a data structure and navigate it with filesystem-like commands.
6
+
7
+ * Each appropriate command pretty-prints the first 20 rows of the current data structure.
8
+ * Data structure listings are automatically paged so you're less likely to blow up your REPL
9
+ by inadvertently listing a huge data structure.
10
+ * At the same time, the current object pointed-to by the (pwd) is always available so you can
9
11
map, mapcat, reduce, and grep the actual objects to your heart's content.
10
12
11
13
``` clojure
@@ -18,7 +20,7 @@ map, mapcat, reduce, and grep the actual objects to your heart's content.
18
20
(current :sub1 :sub2 ...) ; return the object referenced by :sub1 and :sub2 from (current)
19
21
```
20
22
21
- * Duck-typed Grep for deeply recursively nested data structures.
23
+ ## Duck-typed Grep for deeply recursively nested data structures.
22
24
23
25
Generally:
24
26
@@ -42,13 +44,15 @@ In this case, grep searched a data structure that reports differences between tw
42
44
This run determined that there were no differences found under (current).
43
45
44
46
45
- * A pipe operator that can map, mapcat, and reduce a collection in Unix-style.
47
+ ## A pipe operator that can map, mapcat, and reduce a collection in Unix-style.
46
48
47
49
``` clojure
48
50
(| (range 50 ) inc #(/ % 2 ) +)
49
51
```
50
52
51
- * Inject behavior before/after/around all forms in a do-style block or thread-last
53
+ ## Behavior injection
54
+
55
+ Inject behavior before/after/around all forms in a do-style block or thread-last
52
56
macro form (experimental).
53
57
54
58
For example:
@@ -70,30 +74,30 @@ Returns a vector containing all forms converted into 0-arg functions. These fun
70
74
can be executed during a map, mapcat, or reduce operation and their results stored, further
71
75
processed, logged, etc.
72
76
73
- ## Usage
77
+ ### Leiningen coordinates
74
78
75
- Open project.clj and change the line that reads:
79
+ ``` clojure
80
+ :repositories [[" jitpack" " https://jitpack.io" ]]
76
81
82
+ :dependencies [[com.github.shopsmart/clojure-navigation " [](https://jitpack.io/#shopsmart/clojure-navigation)" ]]
77
83
```
78
- :repositories [["snapshots" {:url "file:/Users/dorme/.m2/repository/"
79
- ```
80
-
81
- to point to your local Maven repository
82
84
83
- Build using
85
+ ### Maven coordinates
84
86
87
+ ``` xml
88
+ <repositories >
89
+ <repository >
90
+ <id >jitpack.io</id >
91
+ <name >Jitpack repo</name >
92
+ <url >https://jitpack.io</url >
93
+ </repository >
94
+ </repositories >
85
95
```
86
- lein jar
87
- lein deploy snapshots
88
- ```
89
-
90
- Then depend on it in Leiningen using:
91
96
92
- ```
93
- [com.bradsdeals/ clojure-navigation "1.0.0-SNAPSHOT"]
94
- ```
97
+ * GroupId: com.github.shopsmart
98
+ * ArtifactId: clojure-navigation
99
+ * Version: [ ![ Release ] ( http://jitpack.io/v/com.github.shopsmart/clojure-navigation.svg )] ( https://jitpack.io/#shopsmart/clojure-navigation )
95
100
96
- TODO: Add clojars information once we have an official build.
97
101
98
102
## License
99
103
0 commit comments