Skip to content

Commit e025783

Browse files
committed
java-time/max optimization
1 parent 5ea4f3e commit e025783

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/java_time/core.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
"Latest/longest of the given time entities. Entities should be of the same
144144
type"
145145
[o & os]
146-
(last (sort (cons o os))))
146+
(first (sort #(compare %2 %1) (cons o os))))
147147

148148
(defn min
149149
"Earliest/shortest of the given time entities. Entities should be of the same

0 commit comments

Comments
 (0)