let pipe_broadcast () : unit Deferred.t =
let (r, w) = Pipe.create () in
let (rs, ws) = List.(unzip (map (range 0 10) ~f:(fun _ -> Pipe.create ()))) in
don't_wait_for (broadcast r ws);
don't_wait_for (Pipe.write w "fee");
don't_wait_for (Pipe.write w "fi");
don't_wait_for (Pipe.write w "fo");
don't_wait_for (Pipe.write w "fum");
Pipe.close w;
Deferred.List.iteri ~how:`Parallel rs ~f:(fun i r ->
Pipe.iter r ~f:(fun s -> return (printf "%d: %s\n" i s)))