Skip to content

Commit

Permalink
Improve idiom in compare-seqs.
Browse files Browse the repository at this point in the history
  • Loading branch information
greglook committed May 21, 2014
1 parent f3add97 commit d2c1b52
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/puget/data.clj
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
sequences orders differently, it determines the ordering. Otherwise, if the
prefix matches, the longer sequence sorts later."
[order xs ys]
(or (some #(when-not (= 0 %) %)
(map order xs ys))
(or (first (remove zero? (map order xs ys)))
(- (count xs) (count ys))))


Expand Down

0 comments on commit d2c1b52

Please sign in to comment.