summaryrefslogtreecommitdiff
path: root/Source/Jennisys/PrintUtils.fs
diff options
context:
space:
mode:
authorGravatar Rustan Leino <leino@microsoft.com>2012-10-04 13:32:50 -0700
committerGravatar Rustan Leino <leino@microsoft.com>2012-10-04 13:32:50 -0700
commit8911e5c95d4715c2e2626aef67f19793d6f43201 (patch)
treed703bfd931802e780430e32f1339cf77adc342a4 /Source/Jennisys/PrintUtils.fs
parent1c375d1889e628fcd2a1a0fc041673a5f4230d84 (diff)
Put all sources under \Source directory
Diffstat (limited to 'Source/Jennisys/PrintUtils.fs')
-rw-r--r--Source/Jennisys/PrintUtils.fs12
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