// Reset resets all state and switches the prefixes to ps.
// It uses the existing prefixes when ps is nil.
Reset resets all state and switches the prefixes to ps.
It uses the existing prefixes when ps is nil.
// Reset resets all state and switches the prefixes to ps . // It uses the existing prefixes when ps is nil .
func (c *Cursor) Reset(ps []Prefix) {
	ps = newSortedPrefixes(ps, sortAscending, false)
	if len(ps) > 0 {
		c.ps = ps
	}
	c.set(0, c.ps[0].IP.To16())
}
func ( c * Cursor ) Reset ( ps [ ] Prefix ) { ps = newSortedPrefixes ( ps , sortAscending , false ) if len ( ps ) > 0 { c . ps = ps } c . set ( 0 , c . ps [ 0 ] . IP . To16 ( ) ) }
Reset resets all state and switches the prefixes to ps.
Reset resets all state and switches the prefixes to ps .