why there isn't a repeat parameter for animation?

why there isn't a repeat parameter for animation?

if your want make an animation repeat forever
you need to call the current function in the callback of the animation
so in this case,the call stack will quickly extend
it seen that this is not a good strategy