The OCaml standard library provides the function String.concat
https://caml.inria.fr/pub/docs/manual-ocaml/libref/String.html
val concat : string -> string list -> string
String.concat sep slconcatenates the list of stringssl, inserting the separator stringsepbetween each.
Presumably this function exists to make easier to concatenate many strings together in time/space linear in the length of the strings.
Does similar functionality exist for arrays? In particular, is there a way to efficiently concatenate an array of strings together without either 1) writing a C extension and building a tricky intermediate structure or
2) effectively calling String.concat "" (Array.to_list arr)).