Task 3 – Implementing a Retry mechanism using functional techniques
Write a function that implements a retry mechanism for a flaky tower firing operation and returns a Result
type. The function should retry the operation a specified number of times before returning an error:
public bool TowerFire(Tower tower, Enemy enemy) { // Sometimes works and returns true // sometimes doesn't and returns false }
If these tasks are easy for you, you are free to skip this chapter for now and return later when you have read all the others or have any questions about error handling.