diff --git a/src/Iter.mo b/src/Iter.mo index 8140752..77f46d5 100644 --- a/src/Iter.mo +++ b/src/Iter.mo @@ -855,7 +855,7 @@ module { switch (nestedIter.next()) { case (?_iter) { iter := _iter; - iter.next(); + next(); }; case (_) null; }; diff --git a/tests/Itertools.Test.mo b/tests/Itertools.Test.mo index ccfd270..73c7719 100644 --- a/tests/Itertools.Test.mo +++ b/tests/Itertools.Test.mo @@ -699,6 +699,7 @@ let success = run([ let nestedIter = [ [1].vals(), [2, 3].vals(), + [].vals(), [4, 5, 6].vals(), ].vals();