6 lines
130 B
Text
6 lines
130 B
Text
|
|
def repeat(f; n):
|
||
|
|
# state: [count, in]
|
||
|
|
def r:
|
||
|
|
if .[0] >= n then empty else (.[1] | f), (.[0] += 1 | r) end;
|
||
|
|
[0, .] | r;
|