date、idの順で大小を決定する Comparator。
もっとシンプルにできそうでできない。
(fn [a b]
(let [a-date (:date a)
b-date (:date b)]
(if (= a-date b-date)
(< (:id a) (:id b))
(< a-date b-date))))
Go to list of users who liked
More than 5 years have passed since last update.
date、idの順で大小を決定する Comparator。
もっとシンプルにできそうでできない。
(fn [a b]
(let [a-date (:date a)
b-date (:date b)]
(if (= a-date b-date)
(< (:id a) (:id b))
(< a-date b-date))))
Register as a new user and use Qiita more conveniently
Go to list of users who liked