Context
According to the core.logic documentation, conde is really condi, which means it might not return in the same order as mini-kanren.
Question
Thus, if I have something of the form:
(run 1 [q]
(conde ...))
Is it possible that core.logic / mini-kanren will give me different results because:
- the conde can return the results in different order
- run 1 only takes one of them, thus the two could have different first elements
Thanks!
Yes it’s possible.
condemakes no guarantee on the answers order (it’s very much implementation dependent and doesn’t matter since all alternatives are explored in parallel).While playing with core.logic it bites me at multiple times since the unit tests are assuming a specific order.
AFAIK, in the Reasoned Schemer 2nd edition,
condewill be the 1st editioncondi.