let make ?name ~feed ~next () =
let stopped = ref false in
make_general ?name ()
~feed:(fun x ->
if not !stopped then
feed x
else
raise (Feeding_stopped_transform Option.(value ~default:"" name)))
~next:(fun () -> next !stopped)
~stop:(fun () -> stopped := true)