summaryrefslogtreecommitdiffstats
path: root/format.sml
blob: 98e823059ef26a6b5fa03ef9a2ae8574d85b5782 (plain) (blame)
1
2
3
4
5
6
7
structure Format =
struct
  fun listToString (show : 'a -> string) (l : 'a list) =
    "[" ^ String.concatWith ", " (map show l) ^ "]"

  fun pairToString showA showB (a, b) = "(" ^ showA a ^ ", " ^ showB b ^ ")"
end