RosettaCodeData/Task/Repeat/Mathematica/repeat.math

3 lines
69 B
Plaintext

repeat[f_, n_] := Do[f[], {n}];
repeat[Print["Hello, world!"] &, 5];