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

4 lines
68 B
OCaml
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
fun char_repeat (c, n) =
implode (List.tabulate (n, fn _ => c))
;