Repository navigation
Change Observable: changes for Cats & Iterant consistency - #408
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #408 +/- ##
==========================================
- Coverage 88.37% 88.21% -0.16%
==========================================
Files 342 336 -6
Lines 9184 9069 -115
Branches 1207 1232 +25
==========================================
- Hits 8116 8000 -116
- Misses 1068 1069 +1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch th
32A2
at can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed these operators to use
cats.Eqfor equality andcats.Orderfor ordering, thus becoming consistent with the new ops forIterant:distinctUntilChangeddistinctUntilChangedByKeymaxF/maxLmaxByF/maxByLminF/minLminByF/minByLAdded:
foldF/foldLas an alternative tosumL, but that usescats.MonoidRefactored:
sumF/sumLnow usesfoldLeftF, there's no reason for a custom implementationRemoved operators:
distinctdistinctByKeyThe reason for removal is that these operators are unsafe, needing unbounded buffering and because they rely on a
HashSetdata-structure, for which we cannot use Cats's type classes even if we tried really hard, since we are missing a type class for "hashCode", plus it would require extra boxing, etc.The behavior of these operators is actually easy to obtain by means of
scan.