lang_2023/tests/lambdas.lang

13 lines
233 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
2023-04-25 21:21:36 +03:00
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
const y = x + x
return y
}
}