let pipe_fold () : unit Deferred.t = let r = Pipe.of_list (List.range 0 10) in Pipe.fold r ~init:0 ~f:(fun a i -> return (a + i)) >>| fun sum -> printf "sum is %d\n" sum