let pipe_transfer () : unit Deferred.t =
let (r, w) = Pipe.create () in
let (r', w') = Pipe.create () in
don't_wait_for (Pipe.write w 42);
don't_wait_for (Pipe.transfer r w' ~f:(succ));
Pipe.read r' >>| function
| `Eof -> failwith "impossible"
| `Ok a -> printf "a = %d\n" a