Recovery functions are now monadic and receive the retry count