summaryrefslogtreecommitdiff
path: root/Source/Dafny/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Dafny/Util.cs')
-rw-r--r--Source/Dafny/Util.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/Dafny/Util.cs b/Source/Dafny/Util.cs
new file mode 100644
index 00000000..8db3ebc8
--- /dev/null
+++ b/Source/Dafny/Util.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Microsoft.Dafny {
+ class Util
+ {
+ public delegate string ToString<T>(T t);
+ public static string Comma<T>(string comma, IEnumerable<T> l, ToString<T> f) {
+ string res = "";
+ string c = "";
+ foreach(var t in l) {
+ res += c + f(t);
+ c = comma;
+ }
+ return res;
+ }
+ }
+}