lang_2023/tests/lambdas.lang

13 lines
232 B
Text
Raw Normal View History

2023-03-31 12:10:12 +03:00
decl test_lambdas : Unit -> Unit
def test_lambdas = {
const lambda1 = \x -> x * x
const lambda2 = \x -> x.hash:
2023-03-31 12:10:12 +03:00
const lambda3 = \x y -> x + y
const lambda4 = \x -> {
; IO.print: x
2023-03-31 12:10:12 +03:00
const y = x + x
return y
}
}