File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 1867
1867
writer# pr-pair# ~pr-open " , " " }" opts#
1868
1868
(concat [~@(map #(core/list `vector (keyword %) %) base-fields)]
1869
1869
~'__extmap))))
1870
+ 'IKVReduce
1871
+ `(~'-kv-reduce [this# f# init#]
1872
+ (reduce (fn [ret# [k# v#]] (f# ret# k# v#)) init# this#))
1870
1873
])
1871
1874
[fpps pmasks] (prepare-protocol-masks env impls)
1872
1875
protocols (collect-protocols impls env)
Original file line number Diff line number Diff line change 80
80
(map->Person {:firstname " Fred" :lastname " Mertz" :wife :ethel })))
81
81
(is (= (dissoc ethel :husband )
82
82
(map->Person {:firstname " Ethel" :lastname " Mertz" })))
83
+ (is (= (reduce-kv assoc {:age 30 } fred)
84
+ {:age 30 :firstname " Fred" :lastname " Mertz" }))
83
85
(is (= {:foo 'bar} (meta (with-meta (A. ) {:foo 'bar}))))
84
86
(is (= 'bar (:foo (assoc (A. ) :foo 'bar))))
85
87
(is (= (set (keys letters)) #{:a :b :c }))
You can’t perform that action at this time.
0 commit comments