let win_update (wr: win_ref) (w: win) (b: b) : b = let windows' = upd_assoc wr w b.browser_windows in { b with browser_windows = windows' }