let on_input t ~f =
  { t with feed = fun x -> t.feed (f x) }