Ejemplo n.º 1
0
def un_all_different(xs):
    return app(xs, lib.true, lambda h, t:
               lib.bool_and(
                   lib.list_all(lambda x: lib.bool_not(lib.list_num_eq(h, x))),
                   all_different(t)))
Ejemplo n.º 2
0
def test_bool_and(x, y, expected):
    assert reduce(lib.bool_and(x, y)) == expected