more bugfixes in core.iter
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 7 Feb 2023 04:05:35 +0000 (22:05 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 7 Feb 2023 04:05:35 +0000 (22:05 -0600)
core/container/iter.onyx

index 944fc2cb12996b51b83c3522896eec8ca03e9a75..6f12968052fda0c241532d1346e984dd385ce084 100644 (file)
@@ -280,7 +280,7 @@ skip_while :: (it: Iterator($T), predicate: (T) -> bool) -> Iterator(T) {
 #overload
 skip_while :: (it: Iterator($T), ctx: $Ctx, predicate: (T, Ctx) -> bool) -> Iterator(T) {
     return generator(
-        ^.{ iterator = it, ctx = ctx, predicate = predicate },
+        ^.{ iterator = it, ctx = ctx, predicate = predicate, skipped = false },
 
         si => {
             while !si.skipped {
@@ -647,7 +647,7 @@ prod :: macro (x: $I/Iterable, y: $I2/Iterable) => {
 }
 
 #overload
-prod :: (x: $I1/Iterable, y_iter: Iterator(y)) => {
+prod :: (x: $I1/Iterable, y_iter: Iterator($Y)) => {
     y_val, _ := take_one(y_iter);
 
     return generator(