func (cur *sequenceCursor) current() sequenceItem {
	d.PanicIfFalse(cur.valid())
	return cur.getItem(cur.idx)
}
current returns the value at the current cursor position
package types
import "github.com/attic-labs/noms/go/d"
import "fmt"
type sequenceCursor struct {
	parent *sequenceCursor
	seq    sequence
	idx    int
	seqLen int
}
func newSequenceCursor(parent *sequenceCursor, seq sequence, idx int) *sequenceCursor {
	d.PanicIfTrue(seq == nil)
	seqLen := seq.seqLen()
	if idx < 0 {
		idx += seqLen
		d.PanicIfFalse(idx >= 0)
	}
	return &sequenceCursor{parent, seq, idx, seqLen}
}
func (cur *sequenceCursor) length() int {
	return cur.seqLen
}
func (cur *sequenceCursor) getItem(idx int) sequenceItem {
	return cur.seq.getItem(idx)
}
func (cur *sequenceCursor) sync() {
	d.PanicIfFalse(cur.parent != nil)
	cur.seq = cur.parent.getChildSequence()
	cur.seqLen = cur.seq.seqLen()
}
func (cur *sequenceCursor) getChildSequence() sequence {
	return cur.seq.getChildSequence(cur.idx)
}