Creates a new Fixed iterator with a custom comparator.
(vals ...graph.Ref)
| 38 | |
| 39 | // Creates a new Fixed iterator with a custom comparator. |
| 40 | func NewFixed(vals ...graph.Ref) *Fixed { |
| 41 | it := &Fixed{ |
| 42 | it: newFixed(vals...), |
| 43 | } |
| 44 | it.Iterator = graph.AsLegacy(it.it) |
| 45 | return it |
| 46 | } |
| 47 | |
| 48 | // Add a value to the iterator. The array now contains this value. |
| 49 | // TODO(barakmich): This ought to be a set someday, disallowing repeated values. |