let
on_error tr ~f =
on_output tr ~f:(
function
|
Ok
o
->
Ok
o
|
Error
e
->
Error
(f e))