SliceContainsAll returns true if it finds that all items in the slice for which `predicate` returns true
(slice []T, predicate func(item T) bool)
| 81 | |
| 82 | // SliceContainsAll returns true if it finds that all items in the slice for which `predicate` returns true |
| 83 | func SliceContainsAll[T comparable](slice []T, predicate func(item T) bool) bool { |
| 84 | for _, item := range slice { |
| 85 | if !predicate(item) { |
| 86 | return false |
| 87 | } |
| 88 | } |
| 89 | return true |
| 90 | } |
| 91 | |
| 92 | // ExtractValuesMatchingKeys returns a collection of values which matched a specified set of keys, in the exact order of keys. |
| 93 | // Given a collection of items, and a collection of keys to match within that collection |
no outgoing calls
no test coverage detected