(self)
| 1102 | assert lam._ast.body.name == "y" |
| 1103 | |
| 1104 | def test_lambda_free_vars(self): |
| 1105 | x, y = Ints("x y") |
| 1106 | lam = Lambda(x, x + y) |
| 1107 | # x is bound, y is free |
| 1108 | names = {n for n, _ in lam._vars} |
| 1109 | assert "x" not in names |
| 1110 | assert "y" in names |
| 1111 | |
| 1112 | |
| 1113 | # ------------------------------------------------------------------ |