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

Update Semigroup docs for Map #3071

Merged
merged 1 commit into from Sep 23, 2019

Conversation

@codingismy11to7
Copy link
Contributor

commented Sep 18, 2019

I didn't understand that the values in Maps were also combined when two maps are combined - I thought the "hello" -> 2 entry was simply replacing the "hello" -> 0 entry in the first map. Giving the first map's "hello" a value of 1 results in the combined map having a "hello" -> 3 entry, showing that the values were combined.

After understanding that, I realized why my code couldn't find an implicit Semigroup for my Map - I didn't have an implicit Semigroup for my map's values.

Thank you for contributing to Cats!

This is a kind reminder to run sbt prePR and commit the changed files, if any, before submitting.

I didn't understand that the values in Maps were also combined when two maps are combined - I thought the `"hello" -> 2` entry was simply _replacing_ the `"hello" -> 0` entry in the first map. Giving the first map's `"hello"` a value of `1` results in the combined map having a `"hello" -> 3` entry, showing that the values were combined.

After understanding that, I realized why my code couldn't find an implicit `Semigroup` for my Map - I didn't have an implicit `Semigroup` for my map's values.
Copy link
Member

left a comment

Thanks, this does make it a bit easier to see what's going on :)

@codecov-io

This comment has been minimized.

Copy link

commented Sep 18, 2019

Codecov Report

Merging #3071 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3071   +/-   ##
=======================================
  Coverage   93.46%   93.46%           
=======================================
  Files         368      368           
  Lines        6979     6979           
  Branches      184      184           
=======================================
  Hits         6523     6523           
  Misses        456      456

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c138a50...d6064c3. Read the comment docs.

@kailuowang kailuowang merged commit e8e6676 into typelevel:master Sep 23, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.