linkedlist.go
func (list *LinkedList) Sorti() (err error) {
	list.key.Lock()
	defer list.key.Unlock()

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

		return castA - castB, nil
	})
	if err != nil {
		return
	}
	list.last = findLast(list.first)
	return
}
func (list *LinkedList) Sorti() (err error) {
	list.key.Lock()
	defer list.key.Unlock()

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

		return castA - castB, nil
	})
	if err != nil {
		return
	}
	list.last = findLast(list.first)
	return
}
// Sorti rearranges the position of integer entries in this list so that they
// are ascending.