lang_2023/tests/lambdas.lang

13 lines
227 B
Text
Raw Normal View History

2023-05-13 14:54:48 +03:00
decl test_lambdas : -> Unit
2023-03-31 12:10:12 +03:00
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
}
}