mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-06 06:58:45 +00:00
12 lines
233 B
Text
12 lines
233 B
Text
decl test_lambdas : Unit -> Unit
|
|
def test_lambdas = {
|
|
const lambda1 = \x -> x * x
|
|
const lambda2 = \x -> x.hash ()
|
|
const lambda3 = \x y -> x + y
|
|
|
|
const lambda4 = \x -> {
|
|
; IO.print x
|
|
const y = x + x
|
|
return y
|
|
}
|
|
}
|