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
def test_lany_is_early_safe(): x = var() y = var() assert run(0, x, lany((membero, x, y), (eq, x, 2))) == (2,)
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
def test_lany_is_early_safe(): x = var() y = var() assert run(0, x, lany((membero, x, y), (eq, x, 2))) == (2, )
def goal(*args): return lany(*[gc(*args) for gc in goalconsts])