let
register_state env st = env.states <- st :: env.states