question: I do have 2 Exhaustive values (each of t...
# kotest
m
question: I do have 2 Exhaustive values (each of them returning 2 values:
true
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 🙏🏻
I found this
Copy code
operator 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
m
ah I see, then it does not make much sense to do this union! thank you!!