We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d40a16e commit 56a90daCopy full SHA for 56a90da
src/rewrite_clj/printer.clj
@@ -104,7 +104,6 @@
104
(defmethod estimate-length :unquote-splicing [data] (+ 2 (estimate-children-length data)))
105
(defmethod estimate-length :multi-line [data]
106
(let [parts (rest data)]
107
- (+ 2 (count parts)
108
- (reduce
109
- (fn [sum p]
110
- (+ sum (count p))) 0 parts))))
+ (->> (map count parts)
+ (reduce +)
+ (+ 1 (count parts)))))
0 commit comments