mirror of
https://github.com/github/semantic.git
synced 2024-12-01 09:15:01 +03:00
e137f4c68b
Lambdas are so hilariously crippled in Python that they're significantly easier to compile than functions. Indeed, the resulting core looks much like a function definition, without a `rec` binding.
5 lines
199 B
Python
5 lines
199 B
Python
# CHECK-TREE: { const <- \x -> \y -> x; y <- const #true #true; z <- const #false #false; #record { const: const, y : y, z: z, }}
|
|
const = lambda x, y: x
|
|
y = const(True, True)
|
|
z = const(False, False)
|