summaryrefslogtreecommitdiff
path: root/src/lib/repr
diff options
context:
space:
mode:
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