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 12001200 (simple-hash-map :a 1 :b 2 ))
12011201 (into (simple-hash-map ) [[:a 2 ] [:b 4 ]])))
12021202 (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 ))))
12041204
12051205(comment
12061206
12071207 (run-tests )
12081208
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-
12301209 )
You can’t perform that action at this time.
0 commit comments