Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
440: Implement DedupBy in terms of Coalesce r=jswrenn a=phimuemue During the discussion of #423 (comment), we found that `DedupBy`/`DedupByWithCount` could actually be implemented in terms of `Coalesce`. This simplifies the implementation quite a bit and lets derived adaptors inherit specializations. * Implement `fold` on `Coalesce` so that all the adaptors derived from it inherit the specialization (currently, only `DedupBy` has this specialization). * Introduce `CoalescePredicate` (similar to `DedupPredicate`) to allow for different customizations of `Coalesce`. * Introduce parametrizable `CoalesceBy`: Base for `Coalesce`, `DedupBy`, `DedupByWithCount`. * Implement `DedupBy`/`DedupByWithCount` in terms of `CoalesceBy` (using particular `impl`s). * At last, the indirection through `CoalesceCore` is not needed anymore. Co-authored-by: philipp <descpl@yahoo.de>
- Loading branch information
Showing
3 changed files
with
139 additions
and
157 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.