-
Is there a plain way to combine constraints? I tried with intersection type but when testing I get
Even if |
Beta Was this translation helpful? Give feedback.
Answered by
Iltotore
Sep 2, 2021
Replies: 1 comment 16 replies
-
Hello, Instead, you can use the type +>[A, B] = A ==> Greater[A] && Even[B] EDIT: Marked as answer. Check the below comments. |
Beta Was this translation helpful? Give feedback.
16 replies
Answer selected by
Iltotore
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
the use of intersection here is impossible in its current state because intersection is commutative leading to an implicit ambiguity error (multiple possibilities).
Instead, you can use the
&&[A, B]
alias ofAnd
:EDIT: Marked as answer. Check the below comments.