This commit is contained in:
Samuel Berthe
2022-03-20 02:00:08 +01:00
parent 6f2bdeb7a2
commit 10e138a096
2 changed files with 4 additions and 2 deletions

View File

@@ -914,6 +914,9 @@ iter, err := lo.Attempt(0, func(i int) error {
// nil
```
For more advanced retry strategies (delay, exponential backoff...), please take a look on [cenkalti/backoff](https://github.com/cenkalti/backoff).
### Debounce
`NewDebounce` creates a debounced instance that delays invoking functions given until after wait milliseconds have elapsed, until `cancel` is called.

View File

@@ -241,8 +241,7 @@ func KeyBy[K comparable, V any](collection []V, iteratee func(V) K) map[K]V {
return result
}
// Reject - the opposite of Filter, this method returns the elements of collection that predicate does not return truthy for.
// Reject is the opposite of Filter, this method returns the elements of collection that predicate does not return truthy for.
func Reject[V any](collection []V, predicate func(V, int) bool) []V {
result := []V{}