Created
December 29, 2016 11:36
-
-
Save mprokopov/8d837713bf18193ec3c76c638c74bc3c to your computer and use it in GitHub Desktop.
treading macro with partial for placement argument for func as second
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn assign-durations [{:keys [resolve_at resolved_at response_at responded_at] :as v}] | |
(-> v | |
(assign-duration [response_at responded_at] :response-left) | |
(assign-duration [resolve_at resolved_at] :resolve-left))) | |
;; assign-duration | |
(-> (first (select tickets (where {:id 25029}))) | |
(select-keys [ :resolve_at :resolved_at :responded_at :response_at :resolve-left :response-left]) | |
(select-keys [:resolve_at :resolved_at]) | |
vals | |
vec | |
((partial assign-duration {}) :response-left)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment