Skip to main content

Practice · 2 of 2

Bounded Retry

CHALLENGE
Difficulty: intermediate+25 XP

Implement retry(fn, attempts) that calls fn() up to attempts times, returning the first successful result. If fn raises, sleep-free retry; when all attempts fail, re-raise the LAST exception.

Back to lesson: Practice: Chaining Drills