(m M)
| 35 | } |
| 36 | |
| 37 | func Values[M ~map[K]V, K comparable, V any](m M) []V { |
| 38 | r := make([]V, 0, len(m)) |
| 39 | |
| 40 | for _, v := range m { |
| 41 | r = append(r, v) |
| 42 | } |
| 43 | |
| 44 | return r |
| 45 | } |
| 46 | |
| 47 | func Difference[T comparable](a, b []T) []T { |
| 48 | mb := make(map[T]struct{}, len(b)) |
no outgoing calls