def test_for_each(self): assert for_each(value, range(3)) == value((0, 1, 2))
def test_filter_(self): assert filter_(lambda v: value(v % 2 == 0), range(3)) == value((0, 2))
def test_sequence(self): assert sequence([value(v) for v in range(3)]) == value((0, 1, 2))
def test_stack_safety(self): with recursion_limit(100): sequence([value(v) for v in range(500)])
def test_gather(self): assert gather([value(v) for v in range(3)]) == value((0, 1, 2))