From: Brendan Hansen Date: Tue, 7 Feb 2023 04:05:35 +0000 (-0600) Subject: more bugfixes in core.iter X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=01ec704e94477a5cce64ac6d7c4601bb1ca72519;p=onyx.git more bugfixes in core.iter --- diff --git a/core/container/iter.onyx b/core/container/iter.onyx index 944fc2cb..6f129680 100644 --- a/core/container/iter.onyx +++ b/core/container/iter.onyx @@ -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(