RosettaCodeData/Task/Repeat/C++/repeat-1.cpp
2023-07-01 13:44:08 -04:00

5 lines
113 B
C++

template <typename Function>
void repeat(Function f, unsigned int n) {
for(unsigned int i=n; 0<i; i--)
f();
}