summaryrefslogtreecommitdiff
path: root/src/lib/repr
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-09-04 09:42:31 +0200
committerSébastien Dailly <sebastien@chimrod.com>2021-09-04 09:42:31 +0200
commit0b2e63791a073000b70b4463db5d8bce88ab4d23 (patch)
tree4d9a029f45b510913845cb55f0b856e069d91a61 /src/lib/repr
parent66cb521749672586fd5b1182b14e3c5d44829616 (diff)
Update
Diffstat (limited to 'src/lib/repr')
-rw-r--r--src/lib/repr/default.ml10
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