Created
November 3, 2022 08:23
-
-
Save hades2510/343e7a1891b7d055036e1b9eccec620f to your computer and use it in GitHub Desktop.
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
type LTPartial<LHS extends Bit[], RHS extends Bit[]> = LHS extends [infer LHSU extends Bit, ...infer LHSR extends Bit[]] | |
? RHS extends [infer RHSU extends Bit, ...infer RHSR extends Bit[]] | |
? true extends BitLTB<LHSU, RHSU> | |
? true | |
: false extends BitLTB<LHSU, RHSU> | |
? false | |
: "undecided" extends BitLTB<LHSU, RHSU> | |
? LTPartial<LHSR, RHSR> | |
: false | |
: false | |
: false | |
type LT<LHS extends Byte, RHS extends Byte> = LHS extends [infer LHSU extends Bit, ...infer LHSR extends Bit[]] | |
? RHS extends [infer RHSU extends Bit, ...infer RHSR extends Bit[]] | |
? true extends BitLTB<LHSU, RHSU> | |
? true | |
: false extends BitLTB<LHSU, RHSU> | |
? false | |
: "undecided" extends BitLTB<LHSU, RHSU> | |
? LTPartial<LHSR, RHSR> | |
: never | |
: never | |
: never |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment