type List … type ListRange … var EmptyRange … type emptyRange … func (_ *emptyRange) Next() bool { … } func (_ *emptyRange) Item() (index int, value Value) { … } // ListEquals compares two lists lexically. // WARN: This is a naive implementation, calling lhs.Equals(rhs) is typically the most efficient. func ListEquals(lhs, rhs List) bool { … } // ListEqualsUsing uses the provided allocator and compares two lists lexically. // WARN: This is a naive implementation, calling lhs.EqualsUsing(allocator, rhs) is typically the most efficient. func ListEqualsUsing(a Allocator, lhs, rhs List) bool { … } // ListLess compares two lists lexically. func ListLess(lhs, rhs List) bool { … } // ListCompare compares two lists lexically. The result will be 0 if l==rhs, -1 // if l < rhs, and +1 if l > rhs. func ListCompare(lhs, rhs List) int { … } // ListCompareUsing uses the provided allocator and compares two lists lexically. The result will be 0 if l==rhs, -1 // if l < rhs, and +1 if l > rhs. func ListCompareUsing(a Allocator, lhs, rhs List) int { … }