(defstruct AssetMissing [id i32]) (defvar seen i64) (defn load-all [] (signal (AssetMissing {:id 1})) ; Unit — the caller carries on (signal (AssetMissing {:id 2}))) (defn main [] (load-all) ; no handler: a no-op (print-i64 seen) (newline) ; 0 ;; A handler that returns normally accumulates and lets the signaller run on. (handler-bind [(AssetMissing [c] (set seen (+ seen (i64 (.id c)))))] (load-all)) (print-i64 seen) (newline)) ; 3