// Current returns the enumerator's current key, iterator-index, and
// value.  If the enumerator is not pointing at a valid value (because
// Next returned an error previously), Current will return nil,0,0.
516368
func (m *enumerator) Current() ([]byte, int, uint64) {
	var i int
	var v uint64
	if m.lowCurr < len(m.lowIdxs) {
		i = m.lowIdxs[m.lowCurr]
		v = m.currVs[i]
	}
	return m.lowK, i, v
}
1164457
func (bc *BlockChain) CurrentBlock() *types.Block {
	return bc.currentBlock.Load().(*types.Block)
}
822035
func (s *PerUserKeyring) CurrentGeneration() keybase1.PerUserKeyGeneration {
	s.Lock()
	defer s.Unlock()
	return s.currentGenerationLocked()
}
1166548
func (s *Set) Enumerate() []interface{} {
	// Lock set for read
	s.mutex.RLock()
	defer s.mutex.RUnlock()

	// Gather all values into a slice
	values := make([]interface{}, 0)
	for k := range s.m {
		values = append(values, k)
	}

	return values
}
1334910
func (i *TeamMembershipIter) Current() (*TeamMembership, error) {
	if i.err != nil {
		return nil, i.err
	}
	return &i.page[i.i], nil
}
521946
func (i *MemberProfileIter) Current() (*MemberProfile, error) {
	if i.err != nil {
		return nil, i.err
	}
	return &i.page[i.i], nil
}
767149
func Iterate(val Value, it Iteratee) (int, error) {
	if val == nil {
		return 0, nil
	}
	r := reflect.Indirect(reflect.ValueOf(val))
	switch r.Kind() {
	case reflect.Slice, reflect.Array:
		ln := r.Len()
		l := Loop{ln == 1, 1, 0}
		for i := 0; i < ln; i++ {
			v := r.Index(i)
			brk, err := it(i, v.Interface(), l)
			if brk || err != nil {
				return i + 1, err
			}

			l.Index++
			l.Index0++
			l.Last = ln == l.Index
		}
		return ln, nil
	case reflect.Map:
		keys := r.MapKeys()
		ln := r.Len()
		l := Loop{ln == 1, 1, 0}
		for i, k := range keys {
			v := r.MapIndex(k)
			brk, err := it(k.Interface(), v.Interface(), l)
			if brk || err != nil {
				return i + 1, err
			}

			l.Index++
			l.Index0++
			l.Last = ln == l.Index
		}
		return ln, nil
	default:
		return 0, fmt.Errorf(`stick: unable to iterate over %s "%v"`, r.Kind(), val)
	}
}
1081243
func (l *pageLexer) current() []byte {
	return l.input[l.start:l.pos]
}
689485
func (s *TokenBuffer) Current() (tok Token, pos Pos, lit string) {
	buf := &s.buf[(s.i-s.n+len(s.buf))%len(s.buf)]
	return buf.tok, buf.pos, buf.lit
}
142990
func (c *KeyCursor) Next() {
	if len(c.current) == 0 {
		return
	}
	// Do we still have unread values in the current block
	if !c.current[0].read() {
		return
	}
	c.current = c.current[:0]
	if c.ascending {
		c.nextAscending()
	} else {
		c.nextDescending()
	}
}
616660
func (d *Dictionary) Iterator() segment.DictionaryIterator {
	rv := &DictionaryIterator{
		d: d,
	}

	if d.fst != nil {
		itr, err := d.fst.Iterator(nil, nil)
		if err == nil {
			rv.itr = itr
		} else if err != vellum.ErrIteratorDone {
			rv.err = err
		}
	}

	return rv
}
832188
func (i *TeamIter) Current() (*Team, error) {
	if i.err != nil {
		return nil, i.err
	}
	return &i.page[i.i], nil
}
161090
func (kv *KV) Iterator(f func([]byte, []byte) bool) error {
	return kv.db.View(func(txn *badger.Txn) error {
		opts := badger.DefaultIteratorOptions
		opts.PrefetchSize = 10
		it := txn.NewIterator(opts)
		defer it.Close()
		for it.Rewind(); it.Valid(); it.Next() {
			item := it.Item()
			if k := item.Key(); k != nil {
				v, err := item.Value()
				if err != nil {
					return err
				}
				if !f(k, v) {
					break
				}
			}
		}
		return nil
	})
}
1097178
func (l *StringLexer) Current() (r rune) {
	r, _ = utf8.DecodeRuneInString(l.input[l.pos:])
	return r
}
629344
func CurrentTime(value interface{}, op FieldOperation) (interface{}, error) {
	if op == PersistOperation {
		return time.Now(), nil
	} else {
		return value, nil
	}
}
1268451
func (i *ProviderIter) Current() (*Provider, error) {
	if i.err != nil {
		return nil, i.err
	}
	return &i.page[i.i], nil
}
297853
func (v *NowValuer) Value(key string) (interface{}, bool) {
	if !v.Now.IsZero() && key == "now()" {
		return v.Now, true
	}
	return nil, false
}