File tree Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change 1200
1200
(simple-hash-map :a 1 :b 2 ))
1201
1201
(into (simple-hash-map ) [[:a 2 ] [:b 4 ]])))
1202
1202
(is (= (transient (simple-hash-map :a 1 :b 2 ))
1203
- (simple-hash-map :a 1 :b 2 ))))
1203
+ (simple-hash-map :a 1 :b 2 ))))
1204
1204
1205
1205
(comment
1206
1206
1207
1207
(run-tests )
1208
1208
1209
- (defn simple-group-by
1210
- [f coll]
1211
- (persistent!
1212
- (reduce
1213
- (fn [ret x]
1214
- (let [k (f x)]
1215
- (assoc! ret k (conj (get ret k (. Vector -EMPTY)) x))))
1216
- (transient (. ObjMap -EMPTY)) coll)))
1217
-
1218
- (simple-group-by
1219
- :ns
1220
- '[{:ns foo :name woz}
1221
- {:ns bar :name goz}
1222
- {:ns bar :name baz}
1223
- {:ns foo :name naz}])
1224
-
1225
- (get (simple-hash-map :a 1 :b 2 :c 3 ) :a )
1226
-
1227
- (#'scan-array-equiv 2 :a
1228
- (unchecked-get (. (simple-hash-map :a 1 :b 2 :c 3 ) -hashobj) (hash :a )))
1229
-
1230
1209
)
You can’t perform that action at this time.
0 commit comments