This is an exceedingly common use case. It's simple to make a retryer using retyrer and wrapping the predicate, but one of this package's design goals is to ensure constructing retryers directly with retryer is rarely needed, even for moderately complex use cases. The implementation is very simple:
(define ((pred->should-retry-proc pred) raised _) (pred raised))
(define <whatever> (retryer #:should-retry? _ .. pred->should-retry-proc))
I'm not sure what to call it though, or if the name should relate to limit-retryer. Maybe filter-retryer?
This is an exceedingly common use case. It's simple to make a retryer using
retyrerand wrapping the predicate, but one of this package's design goals is to ensure constructing retryers directly withretryeris rarely needed, even for moderately complex use cases. The implementation is very simple:I'm not sure what to call it though, or if the name should relate to
limit-retryer. Maybefilter-retryer?