OCaml类似于Python';s字符串连接方法

OCaml类似于Python';s字符串连接方法,ocaml,Ocaml,给定Python中的字符串元素列表,我可以用指定的胶水连接这些元素。例如: ' '.join(["phd", "in", "everything"]) 计算结果为字符串“phd in everything” OCaml中的哪种类似物被认为是最惯用的?也就是说,列表中的字符串元素如何与OCaml中的某个指定字符串连接 Ocaml中的等效值为: #String.concat " " ["phd"; "in"; "everything"] 列表的长度没有限制。Ocaml中的等效项是: #Strin

给定Python中的字符串元素列表,我可以用指定的胶水连接这些元素。例如:

' '.join(["phd", "in", "everything"])
计算结果为字符串
“phd in everything”


OCaml中的哪种类似物被认为是最惯用的?也就是说,列表中的字符串元素如何与OCaml中的某个指定字符串连接

Ocaml中的等效值为:

#String.concat " " ["phd"; "in"; "everything"]

列表的长度没有限制。

Ocaml中的等效项是:

#String.concat " " ["phd"; "in"; "everything"]
对于列表的长度没有限制