// FodderMoveFront moves b to the front of a.
185506
func FodderMoveFront(a *Fodder, b *Fodder) {
	*a = FodderConcat(*b, *a)
	*b = Fodder{}
}
379437
func (fbo *folderBranchOps) ForceFastForward(ctx context.Context) {
	lState := makeFBOLockState()
	fbo.headLock.RLock(lState)
	defer fbo.headLock.RUnlock(lState)
	if fbo.head != (ImmutableRootMetadata{}) {
		// We're already up to date.
		return
	}
	if !fbo.hasBeenCleared {
		// No reason to fast-forward here if it hasn't ever been
		// cleared.
		return
	}
	fbo.hasBeenCleared = false

	fbo.forcedFastForwards.Add(1)
	fbo.goTracked(func() {
		defer fbo.forcedFastForwards.Done()
		ctx, cancelFunc := fbo.newCtxWithFBOID()
		defer cancelFunc()

		fbo.log.CDebugf(ctx, "Forcing a fast-forward")
		var currHead ImmutableRootMetadata
		var err error
	getMD:
		for i := 0; ; i++ {
			currHead, err = fbo.config.MDOps().GetForTLF(ctx, fbo.id(), nil)
			switch errors.Cause(err).(type) {
			case nil:
				break getMD
			case kbfsmd.ServerErrorUnauthorized:
				// The MD server connection might not be authorized
				// yet, so give it a few chances to go through.
				if i > 5 {
					fbo.log.CDebugf(ctx,
						"Still unauthorized for TLF %s; giving up fast-forward",
						fbo.id())
					return
				}
				if i == 0 {
					fbo.log.CDebugf(
						ctx, "Got unauthorized error when fast-forwarding %s; "+
							"trying again after a delay", fbo.id())
				}
				time.Sleep(1 * time.Second)
			default:
				fbo.log.CDebugf(ctx, "Fast-forward failed: %+v", err)
				return
			}
		}
		if currHead == (ImmutableRootMetadata{}) {
			fbo.log.CDebugf(ctx, "No MD yet")
			return
		}
		fbo.log.CDebugf(ctx, "Current head is revision %d", currHead.Revision())

		lState := makeFBOLockState()
		// Kick off partial prefetching once the latest merged
		// revision is set.
		defer func() {
			if err == nil {
				fbo.kickOffPartialSyncIfNeeded(ctx, lState, currHead)
			}
		}()

		fbo.mdWriterLock.Lock(lState)
		defer fbo.mdWriterLock.Unlock(lState)
		fbo.headLock.Lock(lState)
		defer fbo.headLock.Unlock(lState)
		if fbo.head != (ImmutableRootMetadata{}) {
			// We're already up to date.
			fbo.log.CDebugf(ctx, "Already up-to-date: %v", err)
			return
		}

		err = fbo.doFastForwardLocked(ctx, lState, currHead)
		if err != nil {
			fbo.log.CDebugf(ctx, "Fast-forward failed: %v", err)
		}
	})
}
297583
func (m *MotorDriver) Forward(speed byte) (err error) {
	err = m.Direction("forward")
	if err != nil {
		return
	}
	err = m.Speed(speed)
	if err != nil {
		return
	}
	return
}
16165
func FodderEnsureCleanNewline(fodder *Fodder) {
	if !FodderHasCleanEndline(*fodder) {
		FodderAppend(fodder, MakeFodderElement(FodderLineEnd, 0, 0, []string{}))
	}
}
935157
func (s *RedisQueueStore) AddFront(key string, values ...string) error {
	if !strings.HasPrefix(key, s.prefix) {
		key = s.prefix + key
	}
	valuesI := make([]interface{}, len(values))
	for i, v := range values {
		valuesI[i] = v
	}
	return s.client.LPush(key, valuesI...).Err()
}
273848
func FodderHasCleanEndline(fodder Fodder) bool {
	return len(fodder) > 0 && fodder[len(fodder)-1].Kind != FodderInterstitial
}
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)
}
370988
func moveRedRight(h *Node) *Node {
	flip(h)
	if isRed(h.Left.Left) {
		h = rotateRight(h)
		flip(h)
	}
	return h
}
790334
func (slist *syncedList) PushFront(v interface{}) *list.Element {
	slist.Lock()
	defer slist.Unlock()

	return slist.queue.PushFront(v)
}
390495
func TouchMove(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "touchmove", Listener: listener}
}
1250532
func (r *SpecRunner) moveCoverprofiles(runners []*testrunner.TestRunner) {
	for _, runner := range runners {
		_, filename := filepath.Split(runner.CoverageFile)
		err := os.Rename(runner.CoverageFile, filepath.Join(r.getOutputDir(), filename))

		if err != nil {
			fmt.Printf("Unable to move coverprofile %s, %v\n", runner.CoverageFile, err)
			return
		}
	}
}
48150
func (kcp *KCP) remove_front(q []segment, n int) []segment {
	if n > len(q)/2 {
		newn := copy(q, q[n:])
		return q[:newn]
	}
	return q[n:]
}
385447
func (l *List) PushFront(v interface{}) *Element {
	l.lazyInit()
	return l.insertValue(v, &l.root)
}
347883
func (f *AckFwdDep) RollForward(c context.Context) (muts []tumble.Mutation, err error) {
	atmpt, fdep := f.Dep.Fwd(c)
	err = ds.Get(c, atmpt, fdep)
	if err != nil {
		return
	}

	if (atmpt.State != dm.Attempt_EXECUTING && atmpt.State != dm.Attempt_WAITING) || atmpt.CurExecution != fdep.ForExecution {
		logging.Errorf(c, "EARLY EXIT: %s: %s v %s", atmpt.State, atmpt.CurExecution, fdep.ForExecution)
		return
	}

	idx := uint32(fdep.BitIndex)

	if !atmpt.DepMap.IsSet(idx) {
		atmpt.DepMap.Set(idx)

		if atmpt.DepMap.All(true) && atmpt.State == dm.Attempt_WAITING {
			if err = atmpt.ModifyState(c, dm.Attempt_SCHEDULING); err != nil {
				return
			}
			atmpt.DepMap.Reset()
			muts = append(muts, &ScheduleExecution{For: f.Dep.From})
		}

		err = ds.Put(c, atmpt)
	}

	return
}
290023
func (l *segmentList) PushFront(e *segment) {
	segmentElementMapper{}.linkerFor(e).SetNext(l.head)
	segmentElementMapper{}.linkerFor(e).SetPrev(nil)

	if l.head != nil {
		segmentElementMapper{}.linkerFor(l.head).SetPrev(e)
	} else {
		l.tail = e
	}

	l.head = e
}
47385
func MouseMove(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "mousemove", Listener: listener}
}
1110155
func (s *RedisQueueStore) GetFront(key string, length int) (res []string, err error) {
	if !strings.HasPrefix(key, s.prefix) {
		key = s.prefix + key
	}
	res, err = s.client.LRange(key, 0, int64(length-1)).Result()
	if err == redis.Nil {
		return res, nil
	}
	return res, err
}