diff options
Diffstat (limited to 'Source/Jennisys/PrintUtils.fs')
-rw-r--r-- | Source/Jennisys/PrintUtils.fs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/Jennisys/PrintUtils.fs b/Source/Jennisys/PrintUtils.fs new file mode 100644 index 00000000..138b5e77 --- /dev/null +++ b/Source/Jennisys/PrintUtils.fs @@ -0,0 +1,12 @@ +module PrintUtils
+
+let newline = System.Environment.NewLine // "\r\n"
+
+let rec Indent i =
+ if i = 0 then "" else " " + (Indent (i-1))
+
+let rec PrintSep sep f list =
+ match list with
+ | [] -> ""
+ | [a] -> f a
+ | a :: more -> (f a) + sep + (PrintSep sep f more)
\ No newline at end of file |