diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-09-04 09:42:31 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-09-04 09:42:31 +0200 |
commit | 0b2e63791a073000b70b4463db5d8bce88ab4d23 (patch) | |
tree | 4d9a029f45b510913845cb55f0b856e069d91a61 /src/lib/repr | |
parent | 66cb521749672586fd5b1182b14e3c5d44829616 (diff) |
Update
Diffstat (limited to 'src/lib/repr')
-rw-r--r-- | src/lib/repr/default.ml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/repr/default.ml b/src/lib/repr/default.ml index 72cf95d..e8cc091 100644 --- a/src/lib/repr/default.ml +++ b/src/lib/repr/default.ml @@ -1,3 +1,5 @@ +open StdLabels + type t = string let none = "" @@ -56,3 +58,11 @@ let diphtongue : t -> t -> t = fun t1 t2 -> Printf.sprintf "[%s%s]" t1 t2 + +let fold + : t list -> string + = fun elems -> + let buff = Buffer.create 16 in + List.iter elems + ~f:(fun f -> Buffer.add_string buff f); + Buffer.contents buff |