let mapi t ~f = let buffer = String.create (String.length t) in let () = String.iteri t ~f:(fun i c -> String.set buffer i (f i c)) in buffer