Skip to content

Add retryer for only handling values satisfying a predicate #1

Description

@jackfirth

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions