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

Fix Streaming#memoization. #665

Merged
merged 4 commits into from
Nov 19, 2015
Merged

Fix Streaming#memoization. #665

merged 4 commits into from
Nov 19, 2015

Conversation

non
Copy link
Contributor

@non non commented Nov 16, 2015

This commit fixes a bug noticed by @ceedubs. The basic issue
is that we have to be sure to memoize the Eval instance holding
the tail while also memoizing the tail itself when it is
calculated. Previously we were only memoizing the head node.

This commit fixes a bug noticed by @ceedubs. The basic issue
is that we have to be sure to memoize the Eval instance holding
the tail while *also* memoizing the tail itself when it is
calculated. Previously we were only memoizing the head node.
* There are two calls to memoized here -- one is a recursive call
* to this method (on the tail) and the other is a call to memoize
* the Eval instance holding the tail. For more information on how
* .memoize works see Eval#memoize.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: could we turn this into a proper ScalaDoc link? [[cats.Eval.memoize]]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sure.

@ceedubs
Copy link
Contributor

ceedubs commented Nov 16, 2015

This fixes (and replaces) #662.

I left a minor request about the ScalaDoc, but 👍 from me (assuming the build passes).

@codecov-io
Copy link

Current coverage is 82.90%

Merging #665 into master will decrease coverage by -0.04% as of 2b8a3a9

@@            master   #665   diff @@
=====================================
  Files          162    162       
  Stmts         2217   2217       
  Branches        74     74       
  Methods          0      0       
=====================================
- Hit           1839   1838     -1
  Partial          0      0       
- Missed         378    379     +1

Review entire Coverage Diff as of 2b8a3a9

Powered by Codecov. Updated on successful CI builds.

}

// convert List[A] to Streaming[A]
def convert[A](as: List[A]): Streaming[A] =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used anywhere, or just added for possible future use?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, looks like I left that in. I'll remove it.

@adelbertc
Copy link
Contributor

👍 once question about function is answered :-)

@adelbertc
Copy link
Contributor

Strange error, rebuilding, once it's green 👍

ceedubs added a commit that referenced this pull request Nov 19, 2015
@ceedubs ceedubs merged commit 3061c8f into master Nov 19, 2015
@non non deleted the bug/fix-memoize branch April 28, 2016 03:52
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

Successfully merging this pull request may close these issues.

4 participants