Skip to content

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

Closed
ceedubs wants to merge 1 commit into
typelevel:masterfrom
ceedubs:streaming-memoize
Closed

DO NOT MERGE: repeat evaluation with Streaming.memoize#662
ceedubs wants to merge 1 commit into
typelevel:masterfrom
ceedubs:streaming-memoize

Conversation

@ceedubs
Copy link
Copy Markdown
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
Copy Markdown
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