Use update-fn! instead of swap!