RosettaCodeData/Task/Repeat/Raku/repeat.raku

6 lines
83 B
Raku

sub repeat (&f, $n) { f() xx $n };
sub example { say rand }
repeat(&example, 3);