def test_FilteringPrism_set(): l = b.EachTraversal() & b.FilteringPrism(lambda a: a > 0) assert l.set([1, -1, 1], 3) == [3, -1, 3]
def test_FilteringPrism_to_list_of(): l = b.EachTraversal() & b.FilteringPrism(lambda a: a > 0) assert l.to_list_of([1, -1, 1]) == [1, 1]