repeat/3: update accumulator until some condition fails
repeat[update-function; conditional-function; accumulator]
repeat[{echo[x]; sleep[500]; x + 1}; {x le 10}; 1]