try-until - calling functions repeatedly until a predefined condition is met or the number of tries exceeds a limit