fix iterator ending
This commit is contained in:
parent
1033eeeed9
commit
205412ac8e
|
|
@ -305,7 +305,7 @@ function iterator(input) {
|
|||
return {
|
||||
curr: (n = 0) => input[index + n],
|
||||
next: () => input[index++],
|
||||
end: () => input.length - 1 <= index,
|
||||
end: () => input.length <= index,
|
||||
index: () => index
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ function iterator(input) {
|
|||
return {
|
||||
curr: (n = 0) => input[index + n],
|
||||
next: () => input[index++],
|
||||
end: () => input.length - 1 <= index,
|
||||
end: () => input.length <= index,
|
||||
index: () => index
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue