The retry count type: number or "forever"
The success value type of the effect
The error type of the effect
Dependencies required by the effect
Dependencies provided by the effect
A new Effect that retries the original effect on failure.
When times is "forever", the error type is never.
When times is a number, the effect is retried up to that many times after
the initial attempt. If it still fails after all retries, the last error
propagates. When times is "forever", the effect is retried indefinitely
and the error type narrows to never — the effect will eventually succeed
or run forever.
Internally, retry uses catchSome and pipe to re-execute
the effect on each failure.
Retries a failing Effect up to a specified number of times, or indefinitely until it succeeds.