code: func sliceElementType(slices ...[]interface{}) (reflect.Type, error) {
  	var prevType reflect.Type
  	for _, s := range slices {
  		// Go through elements of all given slices and make sure they are all the same type.
  		for _, v := range s {
  			currentType := reflect.TypeOf(v)
  			if prevType == nil {
  				prevType = currentType
  				// We don't support lists of lists yet.
  				if prevType.Kind() == reflect.Slice {
  					return nil, mergepatch.ErrNoListOfLists
  				}
  			} else {
  				if prevType != currentType {
  					return nil, fmt.Errorf("list element types are not identical: %v", fmt.Sprint(slices))
  				}
  				prevType = currentType
  			}
  		}
  	}
  
  	if prevType == nil {
  		return nil, fmt.Errorf("no elements in any of the given slices")
  	}
  
  	return prevType, nil
  }
docs: // Returns the type of the elements of N slice(s). If the type is different,
  // another slice or undefined, returns an error.