let interleave (rs: 'a Pipe.Reader.t list) : 'a Pipe.Reader.t = let (r, w) = Pipe.create () in begin Deferred.List.iter ~how:`Parallel rs ~f:(fun r -> Pipe.transfer_id r w) >>> fun () -> Pipe.close w end; r