Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add retryer for only handling values satisfying a predicate #1

Open
jackfirth opened this issue Jan 12, 2017 · 0 comments
Open

Add retryer for only handling values satisfying a predicate #1

jackfirth opened this issue Jan 12, 2017 · 0 comments

Comments

@jackfirth
Copy link
Owner

jackfirth commented Jan 12, 2017

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?

@jackfirth jackfirth changed the title Add retryer for limiting the thrown value with a predicate Add retryer for only handling values satisfying a predicate Jan 12, 2017
@jackfirth jackfirth modified the milestone: Version 1.0 Jan 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant