IntFromSlice creates a Int from a slice.
(s []int)
| 402 | |
| 403 | // IntFromSlice creates a Int from a slice. |
| 404 | func IntFromSlice(s []int) Int { |
| 405 | if s == nil { |
| 406 | return nil |
| 407 | } |
| 408 | dst := make(Int, len(s)) |
| 409 | for _, v := range s { |
| 410 | dst[v] = struct{}{} |
| 411 | } |
| 412 | return dst |
| 413 | } |
| 414 | |
| 415 | // IntSorted is a set of ints that will be stored as an array. |
| 416 | // Elements are sorted and the order of elements is guaranteed. |
no outgoing calls
searching dependent graphs…