let set a i v = check_bound a i; a.data.(i) <- v