-
Notifications
You must be signed in to change notification settings - Fork 0
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
New functions: fold_on_nonequal_inter and fold_on_nonequal_union #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've suggested some corrections on improvements.
It would be nice, and fairly easy, to have a specialized version of these functions for non-generic maps.
Also adding tests shouldn't be too hard.
Thanks for the suggestion! I forgot to tell that the patch was not ready yet (homogeneous version and tests). I was not fully aware of the unsigned changes, so thanks for the improvements ideas |
Co-authored-by: Dorian Lesbre <[email protected]>
Co-authored-by: Dorian Lesbre <[email protected]>
22b6cc8
to
b6f860c
Compare
It should be good now: I have added the tests and the homogeneous version. The tests obviously revealed that I messed up with the union case (much more complicated than the intersection one). If you find a way to improve the code, then go for it (I don't see obvious ways to do it). Also please tell me if you think the doc is fine. Then we should be able to merge! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've replaced a remaining ma < mb
with unsigned_lt
, simplified g
by removing extra arguments, and improved the doc a bit (multiline code blocks with [ ... ]
don't render well: they keep all whitespace as is).
Was called fold_on_diff in Codex. No tests yet