Exemplo n.º 1
0
def test_lany():
    x = var("x")
    assert len(tuple(lany(eq(x, 2), eq(x, 3))({}))) == 2
    assert len(tuple(lany((eq, x, 2), (eq, x, 3))({}))) == 2
Exemplo n.º 2
0
def test_lany_is_early_safe():
    x = var()
    y = var()
    assert run(0, x, lany((membero, x, y), (eq, x, 2))) == (2,)
Exemplo n.º 3
0
def test_lany():
    x = var('x')
    assert len(tuple(lany(eq(x, 2), eq(x, 3))({}))) == 2
    assert len(tuple(lany((eq, x, 2), (eq, x, 3))({}))) == 2
Exemplo n.º 4
0
def test_lany_is_early_safe():
    x = var()
    y = var()
    assert run(0, x, lany((membero, x, y), (eq, x, 2))) == (2, )
Exemplo n.º 5
0
 def goal(*args):
     return lany(*[gc(*args) for gc in goalconsts])
Exemplo n.º 6
0
 def goal(*args):
     return lany(*[gc(*args) for gc in goalconsts])