Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generalize RetryPolicy function to StateT
Closes #6 - replaced Int => Option[FiniteDuration] with StateT[Option, S, FiniteDuration] Fixes #12 - StateT can memoize result of previous steps Source * Replace Int => Option[FiniteDuration] with (S, StateT[Option, S FiniteDuration]), where S is an abstract type * Remove boundError * Seal RetryPolicy and add constructors on companion object * RetryPolicy only has a Semigroup instance now due to generalizing the transition function Test * Add test to check iterateDelay memoizes
- Loading branch information
Showing
3 changed files
with
127 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.