Copy - returns copy of given set.
(set Set[T])
| 182 | |
| 183 | // Copy - returns copy of given set. |
| 184 | func Copy[T comparable](set Set[T]) Set[T] { |
| 185 | nset := make(Set[T], len(set)) |
| 186 | for k, v := range set { |
| 187 | nset[k] = v |
| 188 | } |
| 189 | return nset |
| 190 | } |
no outgoing calls