コード例 #1
0
ファイル: sudoku.py プロジェクト: fritzo/pomagma
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)))
コード例 #2
0
ファイル: lib_test.py プロジェクト: fritzo/pomagma
def test_bool_and(x, y, expected):
    assert reduce(lib.bool_and(x, y)) == expected