func (list *LinkedList) Sorta() error {
	list.key.Lock()
	defer list.key.Unlock()

	var err error
	list.first, err = mergeSort(list.first, func(a, b interface{}) (int, error) {
		castA, ok := a.(string)
		if !ok {
			return 0, ErrUnexpectedType
		}
		castB, ok := b.(string)
		if !ok {
			return 0, ErrUnexpectedType
		}

		return strings.Compare(castA, castB), nil
	})
	list.last = findLast(list.first)
	return err
}
func (list *LinkedList) Sorta() error {
	list.key.Lock()
	defer list.key.Unlock()

	var err error
	list.first, err = mergeSort(list.first, func(a, b interface{}) (int, error) {
		castA, ok := a.(string)
		if !ok {
			return 0, ErrUnexpectedType
		}
		castB, ok := b.(string)
		if !ok {
			return 0, ErrUnexpectedType
		}

		return strings.Compare(castA, castB), nil
	})
	list.last = findLast(list.first)
	return err
}
func ( list * LinkedList ) Sorta ( ) error { list . key . Lock ( ) defer list . key . Unlock ( ) var err error list . first , err = mergeSort ( list . first , func ( a , b interface { } ) ( int , error ) { castA , ok := a . ( string ) if ! ok { return 0 , ErrUnexpectedType } castB , ok := b . ( string ) if ! ok { return 0 , ErrUnexpectedType } return strings . Compare ( castA , castB ) , nil } ) list . last = findLast ( list . first ) return err }
// Sorta rearranges the position of string entries in this list so that they
// are ascending.
Sorta rearranges the position of string entries in this list so that they are ascending .