The name of 'list' has been changed to 'array'; from now on, 'list' will refer to the linked list.
This commit is contained in:
+3
-3
@@ -15,7 +15,7 @@ import (
|
||||
)
|
||||
|
||||
type ListIterator struct {
|
||||
a *array.ListType
|
||||
a *array.ArrayType
|
||||
count int64
|
||||
index int64
|
||||
start int64
|
||||
@@ -23,7 +23,7 @@ type ListIterator struct {
|
||||
step int64
|
||||
}
|
||||
|
||||
func NewListIterator(list *array.ListType, args []any) (it *ListIterator) {
|
||||
func NewListIterator(list *array.ArrayType, args []any) (it *ListIterator) {
|
||||
var argc int = 0
|
||||
listLen := int64(len(([]any)(*list)))
|
||||
if args != nil {
|
||||
@@ -63,7 +63,7 @@ func NewListIterator(list *array.ListType, args []any) (it *ListIterator) {
|
||||
}
|
||||
|
||||
func NewArrayIterator(a []any) (it *ListIterator) {
|
||||
it = &ListIterator{a: (*array.ListType)(&a), count: 0, index: -1, start: 0, stop: int64(len(a)) - 1, step: 1}
|
||||
it = &ListIterator{a: (*array.ArrayType)(&a), count: 0, index: -1, start: 0, stop: int64(len(a)) - 1, step: 1}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user