let act_update (ar: act_ref) (act: act) (b: b) : b = let environments' = upd_assoc ar act b.browser_environments in { b with browser_environments = environments' }