I am trying to reproduce the examples in The Reasoned Schemer using kanren, and example 45 ("a variable cannot be equal to a list in which it occurs") hangs:
from kanren import var, run, eq
run(1, q, eq((q,), q))
# expected the empty tuple ()
The following also hangs:
from cons import cons
from kanren import var, run, eq
run(1, q, eq(cons(q, ()), q))
# expected an empty tuple
I am not sure this is a bug, so posting before investigating further.
I am trying to reproduce the examples in The Reasoned Schemer using
kanren, and example 45 ("a variable cannot be equal to a list in which it occurs") hangs:The following also hangs:
I am not sure this is a bug, so posting before investigating further.