Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

earliest, latest #107

Closed
coltnz opened this Issue · 2 comments

2 participants

Colin Taylor Michael Klishin
Colin Taylor

I use these a lot, seem useful additions?

(defn earliest [& dts]
  (reduce (fn [dt1 dt2]
            (if (pos? (compare dt1 dt2))
              dt2
              dt1))
          dts))

(defn latest [& dts]
  (reduce (fn [dt1 dt2]
            (if (neg? (compare dt1 dt2))
              dt2
              dt1))
          dts))
Michael Klishin

@coltnz looks good. Please submit a pull request with tests!

Michael Klishin

Fixed in #108.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.