summaryrefslogtreecommitdiff
path: root/Source/Jennisys/PrintUtils.fs
blob: 138b5e77188f24606d127b7c775b88361ea0ff23 (plain)
1
2
3
4
5
6
7
8
9
10
11
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)