@@ -12,6 +12,8 @@ bisection-key
12
12
13
13
[ ![ Clojars Project] ( https://img.shields.io/clojars/v/cirru/bisection-key.svg )] ( https://clojars.org/cirru/bisection-key )
14
14
15
+ Under ` bisection-key.core ` :
16
+
15
17
``` clojure
16
18
; make sure the first parameter is littler
17
19
(bisection-key.core/bisect " a" " c" ) ; "b"
@@ -21,20 +23,29 @@ bisection-key
21
23
bisection-key.core/min-id ; "+"
22
24
bisection-key.core/mid-id ; "T"
23
25
bisection-key.core/max-id ; "z"
26
+ ```
24
27
28
+ Functions under ` bisection-key.util ` :
29
+
30
+ ``` clojure
25
31
; (def v {"a" 1, "b" 1})
26
- (bisection-key.util/key-before v " b" ) ; "aT"
27
- (bisection-key.util/key-after v " a" ) ; "aT"
28
- (bisection-key.util/key-prepend v) ; "G"
29
- (bisection-key.util/key-append v) ; "n"
30
-
31
- (bisection-key.util/assoc-after v " a" 2 ) ; (assoc v "aT" 2)
32
- (bisection-key.util/assoc-before v " b" 2 ) ; (assoc v "aT" 2)
33
- (bisection-key.util/assoc-prepend v 2 ) ; (assoc v "G" 2)
34
- (bisection-key.util/assoc-append v 2 ) ; (assoc v "n" 2)
35
-
36
- (bisection-key.util/get-min-key v) ; "a"
37
- (bisection-key.util/get-max-key v) ; "b"
32
+ (key-before v " b" ) ; "aT"
33
+ (key-after v " a" ) ; "aT"
34
+ (key-prepend v) ; "G"
35
+ (key-append v) ; "n"
36
+ (key-nth v 0 ) ; "a"
37
+ (val-nth v 0 ) ; 1
38
+
39
+ (assoc-after v " a" 2 ) ; (assoc v "aT" 2)
40
+ (assoc-before v " b" 2 ) ; (assoc v "aT" 2)
41
+ (assoc-prepend v 2 ) ; (assoc v "G" 2)
42
+ (assoc-append v 2 ) ; (assoc v "n" 2)
43
+ (assoc-nth v 0 2 ) ; (assoc v "a" 2)
44
+ (assoc-before-nth v 1 2 ) ; (assoc v "aT" 2)
45
+ (assoc-after-nth v 1 2 ) ; (assoc v "n" 2)
46
+
47
+ (get-min-key v) ; "a"
48
+ (get-max-key v) ; "b"
38
49
```
39
50
40
51
Charset:
0 commit comments