list iterators now support start, stop e step

This commit is contained in:
2024-05-04 08:07:49 +02:00
parent d9fbe6f36d
commit 2c5f02cc69
9 changed files with 115 additions and 37 deletions
+12
View File
@@ -9,6 +9,18 @@ import (
"fmt"
)
// Operator names
const (
initName = "init"
cleanName = "clean"
resetName = "reset"
nextName = "next"
currentName = "current"
indexName = "index"
countName = "count"
)
type Iterator interface {
Next() (item any, err error) // must return io.EOF after the last item
Current() (item any, err error)