(*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
(* An array that automatically expands when needed *)
of string
(* `make x` creates a ResizableArray.t where the underlying array has the initial size of `x`.
* However, this is purely for the purposes of optimization:
* `ResizableArray.size (ResizableArray.make 5)` still * evaluates to `0`. *)
(* `set arr i x` raises `Out_of_bounds_set` if `i >= ResizableArray.size arr`, or if `i < 0` *)
(* Expands the underlying array if necessary *)
(* Shrinks the representation to match the number of elements stored *)
(* Returns None if the index is out of bounds. *)
(* Exposed only for white box testing. Do not use this. Really. *)