        (println ~msg)
        result#)))
 
+(t/ann log-io (t/All [x y ...] [String [y ... y -> x] -> [y ... y -> x]]))
 (defn log-io
   "Log function inputs and outputs by wrapping an function f."
   [msg f]

                               :npcs (t/Vec Npc)}))
(t/defalias State (HMap :mandatory {:world World :screen t/Any}))

(t/ann append-log (t/Fn [State String -> State]
                        [State String t/Kw -> State]))
(defn append-log
  "Append a message to the in-game log. The last five log messages are retained."

  [f m ks v]
  (update-in m ks (fn [coll] (f coll v))))

(t/ann concat-in (t/All [x]
                   (t/IFn [x (t/Vec t/Any) t/Any -> x])))
(defn concat-in
  [m ks v]
  (fn-in concat m ks v))

(t/ann conj-in (t/All [x]
                 (t/IFn [x (t/Vec t/Any) t/Any -> x])))
(defn conj-in
  [m ks v]
  (fn-in conj m ks v))

(t/ann map-in (t/All [x]
                [x (t/Vec t/Any) [t/Any -> t/Any] -> x]))
(defn map-in
  [m ks f]
  (fn-in (fn [coll _] (if (vector? coll)
