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

DO NOT MERGE: repeat evaluation with Streaming.memoize #662

Closed
wants to merge 1 commit into from

Conversation

ceedubs
Copy link
Contributor

@ceedubs ceedubs commented Nov 16, 2015

This is a potential bug report and is not meant to be merged in its
current form.

This test fails. It attempts to check that if a Streaming instance is
created via .memoize, then its elements won't be evaluated multiple
times (such as when .toList is called).

One could argue that this is a bogus test case, since side effects
should be tracked in a type other than Unit. However, I believe that
this means that we might be evaluating arguments overly-eagerly, which
is a problem in itself.

I made a naive attempt at fixing this by making Streaming.map a little
lazier in the Cons case, but that didn't seem to do the trick.

@non do you have any thoughts?

This is a potential bug report and is not meant to be merged in its
current form.

This test fails. It attempts to check that if a `Streaming` instance is
created via `.memoize`, then its elements won't be evaluated multiple
times (such as when `.toList` is called).

One could argue that this is a bogus test case, since side effects
should be tracked in a type other than `Unit`. However, I believe that
this means that we might be evaluating arguments overly-eagerly, which
is a problem in itself.

I made a naive attempt at fixing this by making `Streaming.map` a little
lazier in the `Cons` case, but that didn't seem to do the trick.

@non do you have any thoughts?
@ceedubs
Copy link
Contributor Author

ceedubs commented Nov 16, 2015

Fixed by #665.

@ceedubs ceedubs closed this Nov 16, 2015
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.

1 participant