Contains - checks if element is in the set.
(s T)
| 80 | |
| 81 | // Contains - checks if element is in the set. |
| 82 | func (set Set[T]) Contains(s T) bool { |
| 83 | _, ok := set[s] |
| 84 | return ok |
| 85 | } |
| 86 | |
| 87 | // FuncMatch - returns new set containing each value that passes match function. |
| 88 | // A 'matchFn' should accept element in a set as first argument and |
no outgoing calls