예제 #1
0
파일: test_core.py 프로젝트: jaberg/logpy
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
예제 #2
0
파일: test_core.py 프로젝트: jaberg/logpy
def test_lany_is_early_safe():
    x = var()
    y = var()
    assert run(0, x, lany((membero, x, y), (eq, x, 2))) == (2,)
예제 #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
예제 #4
0
def test_lany_is_early_safe():
    x = var()
    y = var()
    assert run(0, x, lany((membero, x, y), (eq, x, 2))) == (2, )
예제 #5
0
파일: arith.py 프로젝트: cherry-wb/logpy
 def goal(*args):
     return lany(*[gc(*args) for gc in goalconsts])
예제 #6
0
파일: arith.py 프로젝트: Mattgallant/CS50AI
 def goal(*args):
     return lany(*[gc(*args) for gc in goalconsts])