1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
extend("flow") extend("std") run_limit = int#limit => { ^count = 1 flow:compose( flow:drain_then(() => slog(count)), flow:stop_when(v => count == limit), flow:chain(() => std:log(count++)), flow:throttle(10) ) } run_limit(14)(step(1,10))