peon/tests/lambda.pn

11 lines
173 B
Plaintext
Raw Permalink Normal View History

2023-03-05 16:50:14 +01:00
import std;
var id = fn (x: int): int {
return x;
};
print(id(1) == 1);
print(fn (x: int): int {return x;}(1) == 1);
print(id(1) == fn (x: int): int {return x;}(1));