Add alt as a more permissive alternative to or#851
Merged
vlovgr merged 6 commits intovlovgr:masterfrom Jun 13, 2025
Merged
Conversation
Merged
Owner
|
Thanks a lot for this @morgen-peschke! I've done some minor refactorings and renamed Edit: note these two cases:
do not fail for The remaining two cases are the ones which are different compared to
|
Contributor
Author
|
Thanks for the added polish (especially the docs) :) |
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 that 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.
Adds
altas a more permissive alternative tooras a possible solution for #850These helpers will be assumed for the examples:
When
ais a singular value, the behavior oforandaltare identical:lhsrhslhs.or(rhs)lhs.alt(rhs)l*00f*fEfEml00mm1mE.or(mE1)mE.or(mE1)mfmE.or(fE)mE.or(fE)md22dl00dm22dffEfEdd122When
ais a compound values, the behavior oforandaltdiverges inthese specific failure cases (and only in these cases):
lhsrhslhs.or(rhs)lhs.alt(rhs)(m, l).parTupledl1mE.and(Loaded)1(m, d).parTupledlmE0(l, m).parTupledl1Loaded.and(mE)1(d, m).parTupledlmE0