// MoveToBack moves element e to the back of list l.
// If e is not an element of l, the list is not modified.
172173
func (l *list) MoveToBack(e *element) {
	if e.list != l || l.root.prev == e {
		return
	}
	// see comment in List.Remove about initialization of l
	l.insert(l.remove(e), l.root.prev)
}
104613
func (l *LineStroker) MoveTo(x, y float64) {
	l.x, l.y = x, y
}
180090
func (l *ByteIntervalList) MoveAfter(e, mark *ByteIntervalElement) {
	if e.list != l || e == mark || mark.list != l {
		return
	}
	l.insert(l.remove(e), mark)
}
1305057
func (l *PacketList) MoveBefore(e, mark *PacketElement) {
	if e.list != l || e == mark || mark.list != l {
		return
	}
	l.insert(l.remove(e), mark.prev)
}
1054
func (l *List) Back() *Element {
	if l.len == 0 {
		return nil
	}
	return l.root.prev
}
477771
func MoveTo(str string, x int, y int) (out string) {
	x, y = GetXY(x, y)

	return applyTransform(str, func(idx int, line string) string {
		return fmt.Sprintf("\033[%d;%dH%s", y+idx, x, line)
	})
}
1225014
func ToApply(migrations []*Migration, current string, direction MigrationDirection) []*Migration {
	var index = -1
	if current != "" {
		for index < len(migrations)-1 {
			index++
			if migrations[index].Id == current {
				break
			}
		}
	}

	if direction == Up {
		return migrations[index+1:]
	} else if direction == Down {
		if index == -1 {
			return []*Migration{}
		}

		// Add in reverse order
		toApply := make([]*Migration, index+1)
		for i := 0; i < index+1; i++ {
			toApply[index-i] = migrations[i]
		}
		return toApply
	}

	panic("Not possible")
}
933151
func MoveTo(db *gorm.DB, value sortingInterface, pos int) error {
	return move(db, value, pos-value.GetPosition())
}
352664
func (l *ByteIntervalList) Back() *ByteIntervalElement {
	if l.len == 0 {
		return nil
	}
	return l.root.prev
}
70311
func (l *PacketList) Back() *PacketElement {
	if l.len == 0 {
		return nil
	}
	return l.root.prev
}
888986
func (c *Cursor) Back(n int) {
	fmt.Fprintf(c.Out, "\x1b[%dD", n)
}
671980
func (t *Trie) moveAllToChild(childStr string, newStr string) {
	rnCopy := &Trie{
		Str:        childStr,
		ChildChars: t.ChildChars,
		Childs:     t.Childs,
		Value:      t.Value,
	}

	t.ChildChars, t.Childs, t.Value = nil, nil, nil
	t.addChild(childStr[0], rnCopy)
	t.Str = newStr
}
1083790
func (l *PacketList) MoveAfter(e, mark *PacketElement) {
	if e.list != l || e == mark || mark.list != l {
		return
	}
	l.insert(l.remove(e), mark)
}
316481
func (l *ItemList) MoveToFront(e *ItemElement) {
	if e.list != l || l.root.next == e {
		return
	}
	// see comment in List.Remove about initialization of l
	l.insert(l.remove(e), &l.root)
}
852819
func (bow *Browser) Back() bool {
	if bow.history.Len() > 1 {
		bow.state = bow.history.Pop()
		return true
	}
	return false
}
1309260
func (r *RuneBuffer) MoveForward() {
	if r.idx == len(r.buf) {
		return
	}
	r.idx++
}
428894
func (e *FwdEdge) Back(c context.Context) (*BackDepGroup, *BackDep) {
	bdg := &BackDepGroup{Dependee: *e.To}
	return bdg, &BackDep{
		DependeeGroup: ds.KeyForObj(c, bdg),
		Depender:      *e.From,
	}
}