Skip to content

Commit e3680ee

Browse files
committed
style
1 parent e4d17e3 commit e3680ee

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/java_time/defconversion.clj

+9-9
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
(defn- combinations [xs f cost]
2222
(let [idxs (g/continuous-combinations (count xs))]
2323
(for [combo idxs]
24-
(vector (fn [& vs]
25-
(let [res (to-seq (apply f vs))]
26-
(subvec res (first combo) (inc (last combo)))))
27-
(g/types (subvec xs (first combo) (inc (last combo))))
28-
(cond-> cost
29-
;; TODO: mark as lossy conversion
30-
;; currently we just incur a 0.5*number of types dropped penalty
31-
(not= (count idxs) (count xs))
32-
(+ (* 0.5 (- (count xs) (count combo)))))))))
24+
[(fn [& vs]
25+
(let [res (to-seq (apply f vs))]
26+
(subvec res (first combo) (inc (last combo)))))
27+
(g/types (subvec xs (first combo) (inc (last combo))))
28+
(cond-> cost
29+
;; TODO: mark as lossy conversion
30+
;; currently we just incur a 0.5*number of types dropped penalty
31+
(not= (count idxs) (count xs))
32+
(+ (* 0.5 (- (count xs) (count combo)))))])))
3333

3434
(def ^:dynamic *fail-on-duplicate-conversion?* true)
3535

0 commit comments

Comments
 (0)