Skip to content

Instantly share code, notes, and snippets.

View chrisatfundingcircle's full-sized avatar

Chris Kaczmarek chrisatfundingcircle

View GitHub Profile
(defn add-statuses [instalments effective-date]
(map (fn [current previous]
(assoc current :status (cond
(<= (:due-date current) effective-date) :due
(<= (:due-date previous) effective-date) :open
:else :scheduled)))
(partition 2 1 (concat [{:due-date 0}] instalments))))
vs