Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unwanted memoization effect #323

Open
arthurpaulino opened this issue Oct 2, 2024 · 0 comments
Open

Unwanted memoization effect #323

arthurpaulino opened this issue Oct 2, 2024 · 0 comments

Comments

@arthurpaulino
Copy link
Contributor

(begin (emit 42) (emit 42)) only emits 42 once (the first time) because the second one is skipped by due to memoization.

One solution is plumbing an emit_counter through evaluation so that each emit increases this (kind of) global variable. It's not really a global variable because it would have to be passed on.

Another solution is accumulating emitted data and make it part of the eval coroutine arguments as well as the public values. The first (emit 42) would make the emitted list grow from nil to (42). This solution would have the advantage of making emitted data provable altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant