Processing equivalent to P5.js "repeat()"

Hi,
On the openprocessing website I see in the p5.js programs “repeat()” where you can call a function and set beginning and end-values for variables and the step with which to increase.
I know you can use a for-loop or while-loop to accomplish the same, but the repeat-function seems a lot easier.
I searched the web, but didn’t find an equivalent in Processing. Am I right?