RosettaCodeData/Task/Repeat-a-string/Standard-ML/repeat-a-string-3.ml

4 lines
68 B
Standard ML

fun char_repeat (c, n) =
implode (List.tabulate (n, fn _ => c))
;