aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gleam/iterator.gleam2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gleam/iterator.gleam b/src/gleam/iterator.gleam
index e4d572a..ad655c4 100644
--- a/src/gleam/iterator.gleam
+++ b/src/gleam/iterator.gleam
@@ -1617,5 +1617,5 @@ pub fn each(over iterator: Iterator(a), with f: fn(a) -> b) -> Nil {
/// ```
///
pub fn yield(element: a, next: fn() -> Iterator(a)) -> Iterator(a) {
- Iterator(fn() { Continue(element, next().continuation) })
+ Iterator(fn() { Continue(element, fn() { next().continuation() }) })
}