func (l List) Iter(f func(v Value, index uint64) (stop bool)) {
	idx := uint64(0)
	cur := newCursorAtIndex(l.sequence, idx)
	cur.iter(func(v interface{}) bool {
		if f(v.(Value), uint64(idx)) {
			return true
		}
		idx++
		return false
	})
}
Iter iterates over the list and calls f for every element in the list. If f returns true then the
iteration stops.
package types
import (
	"sync/atomic"
	"github.com/attic-labs/noms/go/d"
)
type List struct {
	sequence
}
func newList(seq sequence) List {
	return List{seq}
}
func NewList(vrw ValueReadWriter, values ...Value) List {
	ch := newEmptyListSequenceChunker(vrw)
	for _, v := range values {
		ch.Append(v)
	}
	return newList(ch.Done())
}
func NewStreamingList(vrw ValueReadWriter, values <-chan Value) <-chan List {
	out := make(chan List, 1)
	go func() {
		defer close(out)
		ch := newEmptyListSequenceChunker(vrw)
		for v := range values {
			ch.Append(v)
		}
		out <- newList(ch.Done())
	}()
	return out
}
func (l List) Edit() *ListEditor {
	return NewListEditor(l)
}
func (l List) asSequence() sequence {
	return l.sequence
}
func (l List) Value() Value {
	return l
}
func (l List) WalkValues(cb ValueCallback) {
	iterAll(l, func(v Value, idx uint64) {
		cb(v)
	})
}
func (l List) Get(idx uint64) Value {
	d.PanicIfFalse(idx < l.Len())
	cur := newCursorAtIndex(l.sequence, idx)
	return cur.current().(Value)
}
func (l List) Concat(other List) List {
	seq := concat(l.sequence, other.sequence, func(cur *sequenceCursor, vrw ValueReadWriter) *sequenceChunker {
		return l.newChunker(cur, vrw)
	})
	return newList(seq)
}