mirror of
https://github.com/samber/lo.git
synced 2025-09-26 20:11:13 +08:00
merge
This commit is contained in:
@@ -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.
|
||||
|
3
slice.go
3
slice.go
@@ -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{}
|
||||
|
||||
|
Reference in New Issue
Block a user