diff options
Diffstat (limited to 'format.sml')
| -rw-r--r-- | format.sml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/format.sml b/format.sml new file mode 100644 index 0000000..98e8230 --- /dev/null +++ b/format.sml @@ -0,0 +1,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 |
