Skip to content

Conversation

@eb8680
Copy link
Contributor

@eb8680 eb8680 commented Jun 27, 2025

Factored out of #289 into a standalone PR, and not blocked by it or #288.

This PR adds a higher-order operation defstream, two operations iter_ and next_ and defdata rules for Iterable and Iterator, the minimal API required for reinterpreting stream iteration. It does not add a defterm rule, which is the real substance of #288 and #289.

defstream (renamed from #289's forexpr) takes a body expression and a named collection of Iterable-typed Terms, much like Python's ast.GeneratorExp. It is the correct target for #289's syntax transformations of generator expressions to effectful Terms

@jfeser jfeser merged commit 5a579b4 into master Jun 27, 2025
3 checks passed
@jfeser jfeser deleted the eb-defstream branch June 27, 2025 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants