Avoiding duplicated code in flow control

maybe…

(if (some->> (get-last-time uid)
             (> current-time))
  (do-something-with-side-effect uid)
  (update-last-time! current-time))

Minor code golf though. I like some-> and some->> for threading while nil punning; fairly useful for composing nil-able things.

1 Like