let replace_offset (subst: subst) (old_offset: int) (new_offset: int) : subst =
  map
    (fun binding -> replace_binding_offset binding old_offset new_offset)
    subst