; Clojure has no events; a watch on an atom notifies about every change
(def statistic (atom {:starts-count 0 :last-game ""}))
(def started-game (atom nil))
; subscribe to changes
(add-watch started-game :statistic
(fn [_key _ref _old name]
(swap! statistic #(-> %
(update :starts-count inc)
(assoc :last-game name)))))
(reset! started-game "Doom")
(reset! started-game "Heroes")
; last-game is "Heroes"
; starts-count is 2
(println "lastGame is" (:last-game @statistic))
(println "startsCount is" (:starts-count @statistic))