code: func Next(keys []string, services []*registry.Service) selector.Next {
  	possibleNodes, scores := ScoreNodes(keys, services)
  
  	return func() (*registry.Node, error) {
  		var best uint64
  		pos := -1
  
  		// Find the best scoring node from those available.
  		for i, score := range scores {
  			if score >= best && possibleNodes[i] != nil {
  				best = score
  				pos = i
  			}
  		}
  
  		if pos < 0 {
  			// There was no node found.
  			return nil, selector.ErrNoneAvailable
  		}
  
  		// Choose this node and set it's score to zero to stop it being selected again.
  		node := possibleNodes[pos]
  		possibleNodes[pos] = nil
  		scores[pos] = 0
  		return node, nil
  	}
  }
docs: // Next returns a `Next` function which returns the next highest scoring node.