Marc
04/10/2024, 9:16 AMtrue
or false
) is there a built in feature to set a property test for all the possible combinations of this 2 exhaustives?
• true true
• true false
• false true
• false false
thanks 🙏🏻Marc
04/10/2024, 9:39 AMoperator fun <A, B : A> Exhaustive<A>.times(other: Exhaustive<B>): Exhaustive<Pair<A, B>> {
val values = this.values.flatMap { a ->
other.values.map { b ->
Pair(a, b)
}
}
return values.exhaustive()
}
but I don’t understand this enforced relation B : A
Klitos Kyriacou
04/10/2024, 12:01 PMMarc
04/10/2024, 12:06 PM